Hi all,
I am trying to train my classifier system using fasttext supervised classifier as follows:
My txt file head is :
__label__0A001 0a001 “nuclear reactors” and specially designed or prepared equipment and components therefor, as follows: a. “nuclear reactors”; b. metal vessels, or major shopfabricated parts therefor, including the reactor vessel head for a reactor pressure vessel, specially designed or prepared to contain the core of a “nuclear reactor”;
__label__0B001 0b001 plant for the separation of isotopes of “natural uranium”, “depleted uranium” and “special fissile materials”, and specially designed or prepared equipment and components therefor, other than analytical instruments, as follows: a. plant specially designed for separating isotopes of “natural uranium”, “depleted uranium”, and “special fissile materials”
import fasttext
model = fasttext.train_supervised(input='myfile.txt')
However, I get this error:
Traceback (most recent call last):
File "C:/Users/u5712005/PycharmProjects/recognize_dsgl_risky_research/Risky_researcher_DSGL/recognize_dsgl_risky_research/fasttext_main.py", line 53, in <module>
model = fasttext.train_supervised(input=path.lookuptable_keyphrases_fasttext)
File "C:\Users\u5712005\Anaconda3\lib\site-packages\fasttext\FastText.py", line 529, in train_supervised
a = _build_args(args, manually_set_args)
File "C:\Users\u5712005\Anaconda3\lib\site-packages\fasttext\FastText.py", line 421, in _build_args
setattr(a, k, v)
TypeError: (): incompatible function arguments. The following argument types are supported:
1. (self: fasttext_pybind.args, arg0: str) -> None
Invoked with: <fasttext_pybind.args object at 0x0000020F3B47EEF0>, WindowsPath('C:/Users/u5712005/PycharmProjects/recognize_dsgl_risky_research/Risky_researcher_DSGL/data/Output_data/DSG_lookup_fasttext_table.txt')
Any suggestion?
Masi