Xponents
Xponents copied to clipboard
Jython 2.7 support
Type of Feature: [ ] Collaboration or partnership [ ] Improvement or clarification [ X ] New Processing
Description of Feature
use Jython 2.7 for basic usage of API
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)