You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
I am trying to run this parser on Cantonese entries in Wiktionary, but they are not always found, and when they are found, the data returned is... weird.
I attached an example, where some words that exist in Wiktionary are not returned, and other words actually get different pronunciation (!) than the one written in Wiktionary.
Your help is much appreciated!
Thanks.
This is the code I run:
from wiktionaryparser import WiktionaryParser
import codecs
import sys
parser = WiktionaryParser()
with open('wiktionary_data.txt', "w") as outFile:
with codecs.open("wordcount.log", "r", encoding="UTF-8") as inFile:
for line in inFile:
word = line.split()[0]
wiktionaryWord = parser.fetch(word, "Chinese")
if len(wiktionaryWord) > 0:
outFile.write(word.encode('UTF-8') + "," + str(wiktionaryWord[0]) + "\n")
Hi,
Thank you for this excellent parser.
I am trying to run this parser on Cantonese entries in Wiktionary, but they are not always found, and when they are found, the data returned is... weird.
I attached an example, where some words that exist in Wiktionary are not returned, and other words actually get different pronunciation (!) than the one written in Wiktionary.
Your help is much appreciated!
Thanks.
This is the code I run:
This is the file wordcount.log
The text was updated successfully, but these errors were encountered: