We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f480b1 commit cc3a2d1Copy full SHA for cc3a2d1
pythainlp/cls/param_free.py
@@ -37,7 +37,13 @@ def train(self):
37
)
38
return Cx2_list
39
40
- def predict(self, x1: str, k: int = 1):
+ def predict(self, x1: str, k: int = 1) -> str:
41
+ """
42
+ :param str x1: the text that want to predict label.
43
+ :param str k: k
44
+ :return: label
45
+ :rtype: str
46
47
Cx1 = len(gzip.compress(x1.encode("utf-8")))
48
disance_from_x1 = []
49
for i in range(len(self.Cx2_list)):
0 commit comments