For the name file version, check if there is a single argument, and if so, does the named file exist, and if not, does it look like a filename, and if so generate a file not found error, but if it doesn't look like a file name generate the sentiment of the word.
All of the following should be supported:
ml sentiment hugging The best is yet to come
This returns the sentiment of the text on the command line.ml sentiment hugging news.txt
This reads the text for the file if it existscat news.txt | ml sentiment hugging
This reads the text input from STDINml sentiment hugging
This will prompt user for input textSee the aztext package for some example code.
For the name file version, check if there is a single argument, and if so, does the named file exist, and if not, does it look like a filename, and if so generate a file not found error, but if it doesn't look like a file name generate the sentiment of the word.