Jun-11-2018, 04:43 PM
(This post was last modified: Jun-11-2018, 04:43 PM by meganhollie.)
Hi - I'm going to preface this by saying that I have VERY little coding experience, and am cobbling a topic modeling program for a paper I'm writing. I successfully ran the code last week, with no errors. I tried to run it again today and I'm getting the following:
<ipython-input-2-5dd1937bcad9> in <module>()
1 #tokenize
----> 2 file_content = open("nippur-input.txt").read()
3 tokens = nltk.word_tokenize(file_content)
4 print (tokens)
OSError: [Errno 22] Invalid argument
Any ideas on how I should fix this?
If I remove the "" I get :
NameError: name 'nippur' is not defined
I'm sorry if I'm not providing enough information!
ETA: I run a macOS, and I use python through a jupyter notebook, if that is relevant.
file_content = open("nippur-input.txt").read() tokens = nltk.word_tokenize(file_content) print (tokens)OSError Traceback (most recent call last)
<ipython-input-2-5dd1937bcad9> in <module>()
1 #tokenize
----> 2 file_content = open("nippur-input.txt").read()
3 tokens = nltk.word_tokenize(file_content)
4 print (tokens)
OSError: [Errno 22] Invalid argument
Any ideas on how I should fix this?
If I remove the "" I get :
NameError: name 'nippur' is not defined
I'm sorry if I'm not providing enough information!
ETA: I run a macOS, and I use python through a jupyter notebook, if that is relevant.