Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jython 2.7 support #37

Open
mubaldino opened this issue Aug 8, 2019 · 1 comment
Open

Jython 2.7 support #37

mubaldino opened this issue Aug 8, 2019 · 1 comment
Assignees

Comments

@mubaldino
Copy link
Member

Type of Feature:
[ ] Collaboration or partnership
[ ] Improvement or clarification
[ X ] New Processing

Description of Feature

use Jython 2.7 for basic usage of API

@mubaldino
Copy link
Member Author

Proof of concept:
Download = jython.org
Learn: https://wiki.python.org/jython/LearningJython

configure, after Jython install, run from Xponents build:

export JAVA_OPTIONS="-Xmx2g -Xms2g -Dopensextant.solr=./solr/solr7"
export CLASSPATH=./dist/Xponents-3.2/etc:./dist/Xponents-3.2/lib/*

Run:

  • jython27/bin/jython

Example integration:


from org.opensextant.extractors.xcoord import XCoord
x =  XCoord(True)

matches = x.extract("dummy test at 38SMB4611036560 looks bad, bad.")
print(matches)
[38SMB4611036560 @(14:29) matched by MGRS-01]

for m in matches:
    print( m.text, m.pattern_id, m.getLatitude() ) 

(u'38SMB4611036560', u'MGRS-01', 32.86583444516076)

@mubaldino mubaldino self-assigned this Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant