NLP test code This is some test code related to NLP and more
The correct reference (book) for the exercises is: https://www.nltk.org/book/
- IMPORTANT: be sure you are in the right directory
- pipenv shell to install shell
- pip install nlp (or other packages)
>>> import nltk in python shell
>>> nltk.download('wordnet') in python shell
nltk.download('opinion_lexicon')
nltk.download('punkt') etc.
For a specific directory use: To specify the download directory, use for example:
nltk.download('wordnet', download_dir='/workspace/nlp/nltk_data')
On the terminal do: export NLTK_DATA=//workspace/nlp/nltk_data before calling your python script
For error ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv, try: export PIP_USER=no (reference gitpod-io/gitpod#479)
- Go to the correct directory
- Check if pip file is there
- Open shell pipenv shell
- Open python by typing python, this starts the python shell (you will see three arrows like so >>>)
- Use exit() to exit python shell and exit to exit terminal
-
- You have to be in the python shell to run the code
- Run python code from pipenv shell. You know you are in pipenv shell when you see () around the location
- Run python shell from pipenv shell. You know you are in python shell when you see >>>
- Run python code by python name_of_file.py 1. If the file is in a different location you can still run it from pipenv shell using the correct location. For instance if the file is one level above the current location use python ../test.py
- Note pipenv shell has nothing to do with directories. You can always cd to change the directory within the pipenv shell. In the above example you can cd .., pwd to check you are one level up and then directly run python test.py without the ../
& 'n and both but either et for less minus neither nor or plus so therefore times v. versus vs. whether yet
mid-1890 nine-thirty forty-two one-tenth ten million 0.5 one forty- seven 1987 twenty '79 zero two 78-degrees eighty-four IX '60s .025 fifteen 271,124 dozen quintillion DM2,000 …
all an another any both del each either every half la many much nary neither no some such that the them these this those
`there
astride among uppon whether out inside pro despite on by throughout below within for towards near behind atop around if like until below next into if beside ...
third ill-mannered pre-war regrettable oiled calamitous first separable ectoplasmic battery-powered participatory fourth still-to-be-named multilingual multi-disciplinary ...
bleaker braver breezier briefer brighter brisker broader bumper busier calmer cheaper choosier cleaner clearer closer colder commoner costlier cozier creamier crunchier cuter ...
calmest cheapest choicest classiest cleanest clearest closest commonest corniest costliest crassest creepiest crudest cutest darkest deadliest dearest deepest densest dinkiest ...
A A. B B. C C. D E F First G H I J K One SP-44001 SP-44002 SP-44005 SP-44007 Second Third Three Two * a b c d first five four one six three two
can cannot could couldn't dare may might must need ought shall should shouldn't will would
common-carrier cabbage knuckle-duster Casino afghan shed thermostat investment slide humour falloff slick wind hyena override subhumanity machinist ...
Motown Venneboerger Czestochwa Ranzer Conchita Trumplane Christos Oceanside Escobar Kreisler Sawyer Cougar Yvette Ervin ODI Darryl CTCA Shannon A.K.C. Meltex Liverpool ...
undergraduates scotches bric-a-brac products bodyguards facets coasts divestitures storehouses designs clubs fragrances averages subjectivists apprehensions muses factory-jobs ...
all both half many quite such sure this
' 's`
hers herself him himself hisself it itself me myself one oneself ours ourselves ownself self she thee theirs them themselves they thou thy us
her his mine my our ours their thy your
occasionally unabatingly maddeningly adventurously professedly stirringly prominently technologically magisterially predominately swiftly fiscally pitilessly ...
further gloomier grander graver greater grimmer harder harsher healthier heavier higher however larger later leaner lengthier less- perfectly lesser lonelier longer louder lower more ...
best biggest bluntest earliest farthest first furthest hardest heartiest highest largest least less most nearest second tightest worst
`aboard about across along apart around aside at away back before behind by crop down ever fast for forth from go high i.e. in into just later low more off on open out over per pie raising start teeth that through under unto up up-pp upon whole with you
to
Goodbye Goody Gosh Wow Jeepers Jee-sus Hubba Hey Kee-reist Oops amen huh howdy uh dammit whammo shucks heck anyways whodunnit honey golly man baby diddle hush sonuvabitch ...
ask assemble assess assign assume atone attention avoid bake balkanize bank begin behold believe bend benefit bevel beware bless boil bomb boost brace break bring broil brush build ...
dipped pleaded swiped regummed soaked tidied convened halted registered cushioned exacted snubbed strode aimed adopted belied figgered speculated wore appreciated contemplated ...
`telegraphing stirring focusing angering judging stalling lactating hankerin' alleging veering capping approaching traveling besieging encrypting interrupting erasing wincing ...
multihulled dilapidated aerosolized chaired languished panelized used experimented flourished imitated reunifed factored condensed sheared unsettled primed dubbed desired ...
predominate wrap resort sue twist spill cure lengthen brush terminate appear tend stray glisten obtain comprise detest tease attract emphasize mold postpone sever return wag ...
bases reconstructs marks mixes displeases seals carps weaves snatches slumps stretches authorizes smolders pictures emerges stockpiles seduces fizzes uses bolsters slaps speaks pleads ...
that what whatever which whichever
that what whatever whatsoever which who whom whosoever
how however whence whenever where whereby whereever wherein whereof why