Closed npx closed 9 years ago
Thanks man, infact the method doesn't exist. Will fix soon
Any update on this? I'm working on my own code to convert kanji to katakana/hiragana, based on the unidic dictionary from ninjal.
tentative fix, I ll try to do the fix over this weekend by added the previous code.
def jReads(target_sent):
sentence = etree.fromstring(cabocha(target_sent).encode('utf-8'))
jReadsToks = []
for chunk in sentence:
for tok in chunk.findall('tok'):
if tok.get("read"): jReadsToks.append(tok.get("read"))
return jReadsToks
Although i never had that error iconv_open is not supported
in the past, but let me confirm.
When this function runs on my machine: jNlp.jCabocha.cabocha
it doesn't return xml. However, it works fine if I change the line command = ['cabocha', '-f', '3 <', temp.name] to command = ['cabocha', '-f', '3', temp.name]
Also, you're looking for the 'read' label in the xml? But the xml I get back is pretty sparse (still useable for my purposes though):
I'm not sure if maybe I configured cabocha or one of its dependencies incorrectly?
Did you ever get the 'read' label issue fixed?
@anyong https://github.com/kevincobain2000/jProcessing/commit/d59425fb8b63365340458ec683037f4d98e7e255 fixes it. Just didn't close the issue.
Hey there,
I compiled and installed all dependencies and now wanna run some of the examples presented here.
I tried replacing the jReads with the jTokenize method but I didn't expect that to work :)
I found and old implementation that I took and changed to using
cabocha()
.However, I don't seem to be getting a valid XML:
I compiled and installed
iconv
but is this related to the problem?Also, I verified my installation of
mecab
andcabocha
and both seem to work fine.But jReads really does not exist xP