Git Product home page Git Product logo

pareidoscope's People

Contributors

tsproisl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pareidoscope's Issues

Are updates planned?

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'"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.