# natural language parsing / data visualization

**URL:** <https://blenderartists.org/t/natural-language-parsing-data-visualization/559705>\
**Category:** Python Support\
**Created:** [December 17, 2012, 3:17am UTC](https://blenderartists.org/t/natural-language-parsing-data-visualization/559705 "2012-12-17T03:17:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sc3sc3](https://blenderartists.org/letter_avatar_proxy/v4/letter/s/e56c9b/32.png) [@sc3sc3](https://blenderartists.org/u/sc3sc3)\
**Post date:** [December 17, 2012, 3:17am UTC](https://blenderartists.org/t/natural-language-parsing-data-visualization/559705/1 "2012-12-17T03:17:50Z")

</div>

hi

i’ve done some data visualization concerning natural language parsing  
with the stanford language parser using swing ( java )  
[http://nlp.stanford.edu/software/lex-parser.shtml](http://nlp.stanford.edu/software/lex-parser.shtml)

now i would like to take that into blender 🙂

for python  
the following package comes to mind  
the natural language toolkit  
[http://nltk.org/](http://nltk.org/)

but i’m having problems using the package in blender

anybody has any ideas or thoughts on how to import the package into blender ?

thanks for any info  
regards  
sc3

---

<div class="post-metadata">

**Author:** ![Afeitadora](https://blenderartists.org/user_avatar/blenderartists.org/afeitadora/32/22480_2.png) [@Afeitadora](https://blenderartists.org/u/Afeitadora)\
**Post date:** [December 17, 2012, 5:16am UTC](https://blenderartists.org/t/natural-language-parsing-data-visualization/559705/2 "2012-12-17T05:16:48Z")

</div>

Install the package for the python version used in blender (3.2). Then copy the package from e.g. C:\Python32\Lib\site-packages to  
C:\Program Files\Blender Foundation\Blender\2.64\scripts\modules. (You may need to install python 3.2 first)  
OR  
Get the package compiled for your system from somewhere and copy it to …\scripts\modules  
Now you can import nltk in every script.

---

<div class="post-metadata">

**Author:** ![sc3sc3](https://blenderartists.org/letter_avatar_proxy/v4/letter/s/e56c9b/32.png) [@sc3sc3](https://blenderartists.org/u/sc3sc3)\
**Post date:** [December 17, 2012, 10:55am UTC](https://blenderartists.org/t/natural-language-parsing-data-visualization/559705/3 "2012-12-17T10:55:24Z")

</div>

@Afeitadora

thanks for your answer  
i will try that if i get that far

problem is that nltk is not really python 3 ready yet  
, they’re in the process of porting it  
there is an experimental branch

---

<div class="post-metadata">

**Author:** ![sc3sc3](https://blenderartists.org/letter_avatar_proxy/v4/letter/s/e56c9b/32.png) [@sc3sc3](https://blenderartists.org/u/sc3sc3)\
**Post date:** [December 17, 2012, 1:12pm UTC](https://blenderartists.org/t/natural-language-parsing-data-visualization/559705/4 "2012-12-17T13:12:26Z")

</div>

it’s a bit of a mess  
blender now uses python3.3

i cannot install nltk with python3.3  
but i can with python3.2

then copied the installed directories to the blender ‘modules’ directory as you said

i can already to the following:  
import nltk  
sentence = ‘this is a sentence’  
tokens = nltk.word\_tokenize(sentence)  
print(tokens)

this is great 🙂  
but the following

tagged = nltk.pos\_tag(tokens)  
print(tagged)

complains about “ImportError: No module named ‘numpy’”

i remember much ado about including numpy or not into blender

how can i install numpy for blender ?

thanks  
regards  
sc3

---

<div class="post-metadata">

**Author:** ![Uncle\_Entity](https://blenderartists.org/user_avatar/blenderartists.org/uncle_entity/32/8856_2.png) [@Uncle\_Entity](https://blenderartists.org/u/Uncle_Entity)\
**Post date:** [December 17, 2012, 4:48pm UTC](https://blenderartists.org/t/natural-language-parsing-data-visualization/559705/5 "2012-12-17T16:48:17Z")

</div>

Apparently too many people complained so numpy doesn’t get bundled by default, you have to install it however you install other python modules and/or mess with sys.path to get python to see it.

---

<div class="post-metadata">

**Author:** ![sc3sc3](https://blenderartists.org/letter_avatar_proxy/v4/letter/s/e56c9b/32.png) [@sc3sc3](https://blenderartists.org/u/sc3sc3)\
**Post date:** [December 18, 2012, 4:44am UTC](https://blenderartists.org/t/natural-language-parsing-data-visualization/559705/6 "2012-12-18T04:44:24Z")

</div>

i give up on importing nltk into blender

it is really not ready for python3

thanks for your responses

---

<div class="post-metadata">

**Author:** ![Afeitadora](https://blenderartists.org/user_avatar/blenderartists.org/afeitadora/32/22480_2.png) [@Afeitadora](https://blenderartists.org/u/Afeitadora)\
**Post date:** [December 18, 2012, 4:48am UTC](https://blenderartists.org/t/natural-language-parsing-data-visualization/559705/7 "2012-12-18T04:48:10Z")

</div>

Just do it exactly the same way you did with nltk.  
At [http://www.lfd.uci.edu/~gohlke/pythonlibs/](http://www.lfd.uci.edu/~gohlke/pythonlibs/) you can find numpy builds for python 3.2.  
For e.g. Win7,64bit choose numpy-unoptimized-1.6.2.win-amd64-py3.2.\*exe
