Skip to content

Commit

Permalink
Merge pull request #40 from JohnSnowLabs/1.1.4
Browse files Browse the repository at this point in the history
NLU 1.1.4 Release Notes - Classify Reddit Sentiment, Amazone Phone reviews in 100+ languages and much more with NLU 1.1.4!
  • Loading branch information
C-K-Loan authored Mar 19, 2021
2 parents 8bd84ce + 04a5f00 commit 8e06d39
Show file tree
Hide file tree
Showing 23 changed files with 25 additions and 943 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions nlu/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ def save(self, path, component='entire_pipeline', overwrite=False):
print(f'Stored model in {path}')
# else : print('Please fit untrained pipeline first or predict on a String to save it')
def predict(self, data, output_level='', positions=False, keep_stranger_features=True, metadata=False,
multithread=True, drop_irrelevant_cols=True, verbose=False):
multithread=True, drop_irrelevant_cols=True, verbose=False,return_spark_df=False):
'''
Annotates a Pandas Dataframe/Pandas Series/Numpy Array/Spark DataFrame/Python List strings /Python String
Expand Down Expand Up @@ -1372,8 +1372,8 @@ def predict(self, data, output_level='', positions=False, keep_stranger_features
except:
print(
"If you use Modin, make sure you have installed 'pip install modin[ray]' or 'pip install modin[dask]' backend for Modin ")

return self.pythonify_spark_dataframe(sdf, self.output_different_levels,
if return_spark_df : return sdf
else : return self.pythonify_spark_dataframe(sdf, self.output_different_levels,
keep_stranger_features=keep_stranger_features,
stranger_features=stranger_features, output_metadata=metadata,
index_provided=index_provided,
Expand Down

0 comments on commit 8e06d39

Please sign in to comment.