Small bug fix regarding UD features conversion to string
This commit is contained in:
@@ -247,7 +247,11 @@ class UD:
|
||||
return self._features_string()
|
||||
|
||||
def to_full_string(self):
|
||||
return "UposTag=" + self.pos + "|" + self._features_string()
|
||||
features = self._features_string()
|
||||
if features:
|
||||
return "UposTag=" + self.pos + "|" + features
|
||||
else:
|
||||
return "UposTag=" + self.pos
|
||||
|
||||
def _features_string(self):
|
||||
return "|".join([f"{feature}={value}" for feature, value in self._sort_features(self.features_map)])
|
||||
|
||||
Reference in New Issue
Block a user