Search code examples
javapythonheuristics

Checking using language heuristics


so I'm doing some coding with python 2.7 and would like to implement language heuristics to check for certain related keywords within a text file. I'm aware of many language heuristics dictionary are coded in java and therefore would like to ask the expert opinion of the community here if there is anyway to import a java based code into python and is how do i go about doing the following paragraph below?

To be clear, I have a text file which contains an article. I aim to use the program to cycle through the article, based on a keyword, to search for any related words to the keyword from the directory (java language heuristics) and to display such related words.

PS: I'm new to this so please be forgiving for my ignorance.


Solution

  • if there is anyway to import a java based code into python

    The Jython implementation of Python will allow you to import Java based code.

    Otherwise, you can use cross-language techniques such as XMLRPC, a REST API, a message queue.