0
Python list half printed
I have written a code on my IDE related to tokenization of some paragraphs and when I tried to print the tokenized form list the half of the list is printed. Can someone explain me why is this happening and how to solve it ?
7 Answers
+ 6
SUKHBEER SINGH ,
> i am using this content in the file *g.txt* :
input1 = "0123 456 789"
print(input1, "--> ", check(input1))Â
input2 = "12.0124"
print(input2, "--> ", check(input2))Â
input3 = "12345"
print(input3, "--> ", check(input3))Â
> the result will be:
['input1', '0123', '456', '789', 'printinput1', 'checkinput1', 'input2', '120124', 'printinput2', 'checkinput2', 'input3', '12345', 'don', 'â', 't', 'take', 'this', 'printinput3', 'checkinput3', 'end']
> but your code should start with:
import nltk
nltk.download('punkt')
from nltk.stem.porter import PorterStemmer
stemmer = PorterStemmer()
...
>>> in sololearn there is no file *g.txt*
+ 4
SUKHBEER SINGH ,
please read the last line of my last post.
+ 3
Paaji can you drop your code here, so that I can identify your problem
+ 1
Maybe it is a time out
0
Anonymous 'g.txt' is just a normal file with some paragraphs đ
0
Lothar Well it will only run on your desktop IDE, not here as this is just like online IDE