Skip to content
Snippets Groups Projects
Commit e664747a authored by Enzo Simonnet's avatar Enzo Simonnet
Browse files

Replace wikstraktor.py

parent e9cf4ddf
No related branches found
No related tags found
No related merge requests found
......@@ -258,7 +258,7 @@ class ParserContext:
#Dans le dictionnaire de keys, il n'y a jamais de senses ou de POS
res = Entry(self.lemma)
for l in self.context:
print(l.keys())
#print(l.keys())
if "pro" in l.keys():
res.set_pronunciations(l['pro'])
if "ety" in l.keys():
......@@ -371,16 +371,16 @@ class Wikstraktor:
res = title == self.constants['pro']
else:
res = title in self.constants['pro']
print(title, res)
#print(title, res)
return res
def isEty(self, title):
if type(self.constants['ety']) == str:
res = title == self.constants['ety']
else:
res = title in self.constants['ety']
return res
def process_POS(self, parsedwikitext):
pass#in subclass
......@@ -402,7 +402,7 @@ class Wikstraktor:
if __name__ == "__main__":
#e = Wikstraktor.get_instance('en', "en")
f = Wikstraktor.get_instance('fr', 'en')
f = Wikstraktor.get_instance('en', 'en')
# print(e.get_file_url("File:LL-Q1860 (eng)-Nattes à chat----parent.wav"))
# print(e.get_file_url("File:LL-Q1860 (eng)-Nattes à chat-parent.wav"))
#e.fetch("water")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment