Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

HELP!! python -m unidic download in Alteryx

yoshimurayasuo
7 - Meteor

 

Based on the below link, I'm trying to download a dictionary called unidic within Python tool in Alteryx but have no idea how to code. Does anyone have any idea and help me with this? 

 

I have successfully installed the library by coding " Alteryx.installPackage(package="unidic")" but do not know how to download the dictionary. 

 

https://pypi.org/project/unidic/

 

 

python -m unidic download

 

2 REPLIES 2
TheOC
15 - Aurora
15 - Aurora

HI @yoshimurayasuo 

May i suggest you try unidic lite?
https://github.com/polm/unidic-lite

This doesn't require any additional downloads (or so it says in the description), and should work the same.

if that doesn't work give me a shout, and i'll have a further look!

Cheers,
TheOC


Bulien
yoshimurayasuo
7 - Meteor

Hi @TheOC

 

Thanks for responding so quickly.

I tried unidic-lite as you suggested but still couldn't get it working.

Attached below is my coding along with the error generated. Please let me know what I am doing wrong. This alteryx environment is really frustrating sometimes. Probably not something a beginner like me should be using...

Appreciate your help!

 

from ayx import Package
from ayx import Alteryx
Alteryx.installPackage(package="MeCab")
Alteryx.installPackage(package="mecab-python3")
Alteryx.installPackage(package="unidic-lite")

 

import MeCab
m = MeCab.Tagger()
result = m.parse("pythonが大好きです").split()
print(result)

 

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-104-4791346ffd66> in <module>
      1 import MeCab
----> 2 wakati = MeCab.Tagger()
      3 result = wakati.parse("pythonが大好きです").split()
      4 print(result)

c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages\MeCab.py in __init__(self, *args)
    489 
    490     def __init__(self, *args):
--> 491         this = _MeCab.new_Tagger(*args)
    492         try:
    493             self.this.append(this)

RuntimeError: 

 

 

Labels