Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdelrhmanNile committed Sep 5, 2022
1 parent 81166f4 commit 55fc746
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions freenlpc/freenlpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ def __init_api(self):
}


def classification(self, text: str, lables: list, multiclass: bool =True):
def classification(self, text: str, labels: list, multiclass: bool =True):
"""perform classification on a piece of text.
Args:
text (str): The block of text you want to analyze. 2,500 tokens maximum.
lables (list): A list of labels you want to use to classify your text. 25 labels maximum.
labels (list): A list of labels you want to use to classify your text. 25 labels maximum.
multiclass (bool, optional): Whether multiple labels should be applied to your text,
meaning that the model will calculate an independent score for each label. Defaults to True.
Expand All @@ -98,7 +98,7 @@ def classification(self, text: str, lables: list, multiclass: bool =True):
while True:
try:
sleep(1)
response = self.__models[self.classification.__name__].classification(text, lables, multiclass)
response = self.__models[self.classification.__name__].classification(text, labels, multiclass)
result = []
for i in range(len(response['labels'])):
info = {}
Expand All @@ -111,12 +111,12 @@ def classification(self, text: str, lables: list, multiclass: bool =True):
except requests.exceptions.HTTPError:
self.__init_api()

def classification2(self, text: str, lables: list, multiclass: bool =True):
def classification2(self, text: str, labels: list, multiclass: bool =True):
"""perform classification on a piece of text.
Args:
text (str): The block of text you want to analyze. 2,500 tokens maximum.
lables (list): A list of labels you want to use to classify your text. 25 labels maximum.
labels (list): A list of labels you want to use to classify your text. 25 labels maximum.
multiclass (bool, optional): Whether multiple labels should be applied to your text,
meaning that the model will calculate an independent score for each label. Defaults to True.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import setup, find_packages

VERSION = '0.1.5'
VERSION = '0.1.6'
DESCRIPTION = 'A wrapper for nlpcloud free-tier services with no requests per minute limits.'
LONG_DESCRIPTION = """# freenlpc
a wrapper for nlpcloud free-tier.
Expand Down

0 comments on commit 55fc746

Please sign in to comment.