Giter VIP home page Giter VIP logo

Comments (6)

nschneid avatar nschneid commented on August 17, 2024

Interesting. Some of those lines must have been ported from conllulex2json.py but never tested properly. Does commenting out the lines with sent_conllulex solve it?

from streusle.

Mindful avatar Mindful commented on August 17, 2024

...actually yes, it looks like. I'll open a PR with the problem lines removed, since it looks like that at least makes the script run.
edit: #97

from streusle.

Mindful avatar Mindful commented on August 17, 2024

Whoops, maybe not. I thought it fixed it because I started getting a bunch of JSON output, but it appears it doesn't make it through the entire file:

Traceback (most recent call last):
  File "/Users/josh/personal/bunmyaku/data/streusle-4.5/UDlextag2json.py", line 405, in <module>
    for sent in load_sents(**vars(argparser.parse_args())):
  File "/Users/josh/personal/bunmyaku/data/streusle-4.5/UDlextag2json.py", line 271, in load_sents
    _postproc_sent(sent)
  File "/Users/josh/personal/bunmyaku/data/streusle-4.5/UDlextag2json.py", line 135, in _postproc_sent
    assert lexe['lexlemma']==' '.join(lem for i in lexe['toknums'] for lem in [sent['toks'][i-1]['lemma']] if lem!='_'),f"In {sent['sent_id']}, MWE lemma is incorrect: {lexe} vs. {sent['toks'][lexe['toknums'][0]-1]}"
AssertionError: In reviews-105237-0001, MWE lemma is incorrect: {'lexlemma': 'go downhill _', 'lexcat': 'V.VID', 'ss': 'v.change', 'ss2': None, 'toknums': [25, 26, 27]} vs. {'#': 25, 'word': 'gone', 'lemma': 'go', 'upos': 'VERB', 'xpos': 'VBN', 'feats': 'Tense=Past|VerbForm=Part', 'head': 18, 'deprel': 'conj', 'edeps': '18:conj:but', 'misc': None, 'smwe': (2, 1), 'wmwe': None, 'lextag': 'B-V.VID-v.change'}

from streusle.

nschneid avatar nschneid commented on August 17, 2024

This should be a step in the right direction. Still testing some things out.

from streusle.

nschneid avatar nschneid commented on August 17, 2024

OK I believe the bugs are fixed. Does it work for you?

from streusle.

Mindful avatar Mindful commented on August 17, 2024

@nschneid Thanks very much for the quick fixes! It does indeed work for me now - or at least, the script runs and outputs a bunch of JSON with no obvious errors.
Closing this issue for now; on the off chance that I bump into something else I'll open a different issue.

from streusle.

Related Issues (20)

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.