Skip to content
Snippets Groups Projects
Commit b5986697 authored by Tomasz Walkowiak's avatar Tomasz Walkowiak
Browse files

new version

parent 4611a91b
Branches
No related tags found
No related merge requests found
Pipeline #2566 passed
......@@ -77,8 +77,13 @@ class Category:
def to_sentence(self, sentence):
"""."""
res = ""
for token in sentence.iter("tok"):
res += token.find("./orth").text + " "
space = ""
for token in list(sentence):
if token.tag == "ns":
space = ""
if token.tag == "tok":
res += space + token.find("./orth").text
space = " "
return res
def add(self, stat, cat, what, sentence):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment