Issue
Execution from ubuntu terminal -->
b@PC:~/fastText$ ./fasttext supervised -input /traningText.txt -output model_trained -label label Read 2M words Number of words: 78155 Number of labels: 116 Progress: 100.0% words/sec/thread: 296977 lr: 0.000000 loss: 1.616176 ETA: 0h 0m
Execution from jupyter notebook --> Attempt 1 (after switching to fastText folder)
./fasttext supervised -input traningText.txt -output model_trained -label label
gives the error -
File "", line 1 ./fasttext supervised -input traningText.txt -output model_trained -label label ^ SyntaxError: invalid syntax
Attempt 2 (after switching to fastText folder)
fasttext supervised -input trainingText -output model_trained -label label
gives the error -
File "", line 1 fasttext supervised -input trainingText.txt -output model_trained -label label ^ SyntaxError: invalid syntax
Attempt 3 (after switching to fastText folder)
/home/fastText/fasttext supervised -input trainingText.txt -output model_trained -label label
gives the error -
NameError Traceback (most recent call last) in ----> 1 home/fastText/fasttext(supervised, -input, trainingText.txt, -output, model_trained, -label, label)
NameError: name 'home' is not defined
What is going wrong ? How can I get my fasttext command to execute from Jupyter notebook ? Pls advise
Solution
You can't execute shell commands from Jupyter and expect the right output.
If you want to use FastText from Jupyter, my advice is to install FastText python binding.
You can read official fastText tutorial (now explaining python binding, too).
Here you find some examples.
Answered By - Stefano Fiorucci - anakin87
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.