Ahmet Yildirim commited on
Commit ·
cc6325d
1
Parent(s): 340013a
- Fix parametername of lemmatisation
Browse files- modeling_humit_tagger.py +25 -8
modeling_humit_tagger.py
CHANGED
|
@@ -974,17 +974,34 @@ class HumitTaggerModel(torch.nn.Module):
|
|
| 974 |
|
| 975 |
self.eval()
|
| 976 |
|
| 977 |
-
if "
|
| 978 |
tag_config["lemmatize"] = False
|
| 979 |
-
|
| 980 |
-
|
| 981 |
-
else:
|
| 982 |
tag_config["lemmatize"] = True
|
| 983 |
-
|
| 984 |
-
|
| 985 |
-
|
| 986 |
-
if "lemmatize" in tag_config and tag_config["lemmatize"]==False:
|
| 987 |
tag_config["lemmatize"] = False
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 988 |
|
| 989 |
if "one_sentence_per_line" not in tag_config:
|
| 990 |
tag_config["one_sentence_per_line"]=False
|
|
|
|
| 974 |
|
| 975 |
self.eval()
|
| 976 |
|
| 977 |
+
if "lemmatisation" in tag_config and tag_config["lemmatisation"]==False:
|
| 978 |
tag_config["lemmatize"] = False
|
| 979 |
+
del tag_config["lemmatisation"]
|
| 980 |
+
elif "lemmatisation" in tag_config:
|
|
|
|
| 981 |
tag_config["lemmatize"] = True
|
| 982 |
+
del tag_config["lemmatisation"]
|
| 983 |
+
elif "lemmatization" in tag_config and tag_config["lemmatization"]==False:
|
|
|
|
|
|
|
| 984 |
tag_config["lemmatize"] = False
|
| 985 |
+
del tag_config["lemmatization"]
|
| 986 |
+
elif "lemmatization" in tag_config:
|
| 987 |
+
tag_config["lemmatize"] = True
|
| 988 |
+
del tag_config["lemmatization"]
|
| 989 |
+
else:
|
| 990 |
+
tag_config["lemmatize"] = True
|
| 991 |
+
if "lemmatisation" in tag_config and tag_config["lemmatisation"]==False:
|
| 992 |
+
tag_config["lemmatize"] = False
|
| 993 |
+
del tag_config["lemmatisation"]
|
| 994 |
+
elif "lemmatisation" in tag_config:
|
| 995 |
+
tag_config["lemmatize"] = True
|
| 996 |
+
del tag_config["lemmatisation"]
|
| 997 |
+
elif "lemmatization" in tag_config and tag_config["lemmatization"]==False:
|
| 998 |
+
tag_config["lemmatize"] = False
|
| 999 |
+
del tag_config["lemmatization"]
|
| 1000 |
+
elif "lemmatization" in tag_config:
|
| 1001 |
+
tag_config["lemmatize"] = True
|
| 1002 |
+
del tag_config["lemmatization"]
|
| 1003 |
+
else:
|
| 1004 |
+
tag_config["lemmatize"] = True
|
| 1005 |
|
| 1006 |
if "one_sentence_per_line" not in tag_config:
|
| 1007 |
tag_config["one_sentence_per_line"]=False
|