Skip to content

Commit 57a3d7d

Browse files
committed
Added a port of XCoord for python use.
1 parent 6b2d98a commit 57a3d7d

5 files changed

Lines changed: 561 additions & 3 deletions

File tree

build.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@
3535
<copy file="${java.resources}/us-state-metadata.csv" todir="${pylib.resources}"/>
3636
<copy file="${java.resources}/country-names-2015.csv" todir="${pylib.resources}"/>
3737
<copy file="${java.resources}/country-names-2021.csv" todir="${pylib.resources}"/>
38+
<!-- Python lib has its own tweaked versions of these for coord/dates:
3839
<copy file="${java.resources}/geocoord_patterns.cfg" todir="${pylib.resources}"/>
39-
<copy file="${java.resources}/datetime_patterns.cfg" todir="${pylib.resources}"/>
40+
<copy file="${java.resources}/datetime_patterns.cfg" todir="${pylib.resources}"/> -->
4041
<copy file="${java.resources}/poli_patterns.cfg" todir="${pylib.resources}"/>
4142
<copy file="${java.resources}/ISO-639-2_utf-8.txt" todir="${pylib.resources}"/>
4243

src/main/python/MANIFEST.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
include LICENSE
2-
include opensextant/resources/geocoord_patterns.cfg
2+
include opensextant/resources/geocoord_patterns_py.cfg
33
include opensextant/resources/country-names-2021.csv
44
include opensextant/resources/country-names-2015.csv
5-
include opensextant/resources/datetime_patterns.cfg
65
include opensextant/resources/datetime_patterns_py.cfg
76
include opensextant/resources/poli_patterns.cfg
87
include opensextant/resources/ISO_639_2_utf-8.txt

src/main/python/opensextant/FlexPat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ def default_tests(self, scope="rule"):
531531
test_results = []
532532
for t in self.pattern_manager.test_cases:
533533
expect_valid_match = "FAIL" not in t.text
534+
print("Test", t.family, t.text)
534535
output1 = self.extract_patterns(t.text, features=[t.family])
535536

536537
output = []

0 commit comments

Comments
 (0)