is there a way to install the nodebox English linguistics library through pip install? - nlp

The NodeBox English linguistic library for Python has some nice features, like conjugation, that could be very useful for a project.
I tried installing through pip in a particular virtualenv, but pip search nodebox only brings up:
NodeBox - Simple application for creating 2-dimensional
graphics and animation using Python code
nodebox-color - Color classes for python
NodeBox-for-OpenGL - 2D animation with Python code
nodebox-opengl - NodeBox for OpenGL is a free, cross-platform
library for generating 2D animations with Python
programming code.
Is it pip-installable (in a virtualenv) by another name maybe? Or is the only way to install to
Put the en library folder in the same folder as your script so NodeBox
can find the library. You can also put it in ~/Library/Application
Support/NodeBox/. It takes some time to load all the data the first
time.
as stated on their website?

The Nodebox library has been succeeded by pattern, which is on the PyPI. The NLP functionality is contained in the pattern.en module. It can be installed with:
pip install pattern

Related

Working backwards from Python namespace to package

I'm working from someone else's code, and they're using openCV, therefore they used "import cv2". I didn't have it installed in my environment at the time so I needed to install that module. Having moved from MATLAB I'm still remembering different packages, but I remembered cv2 is openCV. However, had I not known cv2 was openCV, is there a programmatic way I can find out the package name from the import? i.e: using cv2, and not having openCV installed, finding out what cv2 is?

How can I audit and minimize requirements.txt?

I looking for a way to audit and minimize requirements.txt. I've taken over a project that has grown bloated over several iterations, and I'm trying to make it more maintainable. The current virtual environment I'm in was created from the previous requirements.txt; that file has packages that are no longer imported in any script.
In the past, I've done this manual process:
Search through project directory to find all python files in all subfolders
Search through each python file found to find all import x and from x import y statements, add those packages to a list
pip show each of packages on the list, adding any dependencies to the end of the list
Once list is exhausted, sort and compare to requirements.txt
Remove requirements that aren't on the list.
Assuming that my code performs no relative imports, is there a way to automate this process? I can't imagine I'd be the first person looking for such a tool (or gist, or script). I couldn't find any. I use windows, but I'm happy to linux commands on windows subsystem for linux.
I think a tool that would help with would be pip_missing_reqs.

Can a python module be imported without installing

Is this possible that a module is imported without installing the same. If no then why is my spyder IDE is showing a warning on the line where it is written import nltk even when nltk is not installed
Spyder runs a static analysis on the code you have in the Editor to offer hints and errors about it.
Since the analysis is static, it means Spyder doesn't run your code to perform it. In your case it simply detects that you have a line like
import nltk
but that there's no other use or call to nltk (for example, with a code like nltk.pos_tag(tokens) or something like that).

Embedding specific Python

I am currently embedding Python3 into my C++ application.
We also ships a defined version of Python3. Currently Py_Initialize finds the system python in /usr/lib/python3.5 (which we do not want). I could not yet figure out how I can strip the search path before calling Py_Initialize and force it to search in my custom path.
It can be done with Py_SetPythonHome.

Creating a Python Project using Atom

I m trying to create a python project in Atom IDE. I downloaded and installed Atom and also some package like project_manager.
I am finding it extremely hard to get going.
My project would have a few python files in the code folder. Some data files in the data folder, etc.
How do I start this in Python. I goggled this as well but still finding it difficult.
P.S. I know how to create python files and run them using IDLE. Want to do my work in a more structured manner by creating a project and then being able to compile and run my files fast and easily.
Regards
Bonson

Resources