tsproisl / pareidoscope Goto Github PK
View Code? Open in Web Editor NEWA collection of tools for determining the association between arbitrary linguistic structures.
License: GNU General Public License v3.0
A collection of tools for determining the association between arbitrary linguistic structures.
License: GNU General Public License v3.0
I cloned the latest UD_English-EWT, and converted en_ewt-ud-train.conllu
into a SQLite db.
Then, I tried the query ex_association_two_structures.json
as mentioned in the README as follows:
pareidoscope_association_strength --format db -o associations en-ud-train.db ex_association_two_structures.json
, but I encountered the "float division by zero" error as follows:
INFO 2022-10-04 17:13:08,334: Using 3 + 1 processes
INFO 2022-10-04 17:13:08,334: query no. 0
INFO 2022-10-04 17:13:11,559: {'embeddings': {'o11': 182, 'r1': 303.0, 'c1': 3996.0, 'n': 7584, 'inconsistent': 0}, 'subgraphs': {'o11': 182, 'r1': 303.0, 'c1': 3996.0, 'n': 7584, 'inconsistent': 0}, 'focus_points': {'o11': 179, 'r1': 284.0, 'c1': 3930.0, 'n': 7122, 'inconsistent': 0}, 'sentences': {'o11': 176, 'r1': 264.0, 'c1': 3178.0, 'n': 5153, 'inconsistent': 26}}
INFO 2022-10-04 17:13:11,559: query no. 1
INFO 2022-10-04 17:13:15,007: {'embeddings': {'o11': 6, 'r1': 1306.0, 'c1': 68.0, 'n': 22288, 'inconsistent': 0}, 'subgraphs': {'o11': 6, 'r1': 1306.0, 'c1': 68.0, 'n': 22288, 'inconsistent': 0}, 'focus_points': {'o11': 6, 'r1': 1306.0, 'c1': 68.0, 'n': 22288, 'inconsistent': 0}, 'sentences': {'o11': 6, 'r1': 1118.0, 'c1': 62.0, 'n': 9136, 'inconsistent': 10}}
INFO 2022-10-04 17:13:15,007: query no. 2
INFO 2022-10-04 17:13:19,327: {'embeddings': {'o11': 122, 'r1': 250.0, 'c1': 237.0, 'n': 22884, 'inconsistent': 0}, 'subgraphs': {'o11': 122, 'r1': 250.0, 'c1': 237.0, 'n': 22884, 'inconsistent': 0}, 'focus_points': {'o11': 122, 'r1': 250.0, 'c1': 237.0, 'n': 22884, 'inconsistent': 0}, 'sentences': {'o11': 121, 'r1': 244.5, 'c1': 229.5, 'n': 9227, 'inconsistent': 3}}
INFO 2022-10-04 17:13:19,327: query no. 3
INFO 2022-10-04 17:13:21,180: {'embeddings': {'o11': 0, 'r1': 0.0, 'c1': 0.0, 'n': 0, 'inconsistent': 0}, 'subgraphs': {'o11': 0, 'r1': 0.0, 'c1': 0.0, 'n': 0, 'inconsistent': 0}, 'focus_points': {'o11': 0, 'r1': 0.0, 'c1': 0.0, 'n': 0, 'inconsistent': 0}, 'sentences': {'o11': 0, 'r1': 0.0, 'c1': 0.0, 'n': 0, 'inconsistent': 0}}
INFO 2022-10-04 17:13:21,181: query no. 4
INFO 2022-10-04 17:13:24,281: {'embeddings': {'o11': 3, 'r1': 250.0, 'c1': 306.0, 'n': 22884, 'inconsistent': 0}, 'subgraphs': {'o11': 3, 'r1': 250.0, 'c1': 306.0, 'n': 22884, 'inconsistent': 0}, 'focus_points': {'o11': 3, 'r1': 250.0, 'c1': 306.0, 'n': 22884, 'inconsistent': 0}, 'sentences': {'o11': 3, 'r1': 241.0, 'c1': 270.0, 'n': 9227, 'inconsistent': 10}}
Traceback (most recent call last):
File "/Users/yayamamo/.pyenv/versions/3.10.6/bin/pareidoscope_association_strength", line 215, in <module>
main()
File "/Users/yayamamo/.pyenv/versions/3.10.6/bin/pareidoscope_association_strength", line 207, in main
o, e = statistics.get_contingency_table(freq["o11"], freq["r1"], freq["c1"], freq["n"])
File "/Users/yayamamo/.pyenv/versions/3.10.6/lib/python3.10/site-packages/pareidoscope/utils/statistics.py", line 25, in get_contingency_table
e[1][1] = r1 * c1 / float(n)
ZeroDivisionError: float division by zero
Is there anything that I can work around?
In addition, the other query examples resulted in failure of "KyeError: 'query'"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.