Comments (6)
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.
...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.
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.
This should be a step in the right direction. Still testing some things out.
from streusle.
OK I believe the bugs are fixed. Does it work for you?
from streusle.
@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)
- Age construction: year_old, month_old
- Lexcat of non-verbal MWE with fixed (integral) preposition HOT 3
- Review predicative MWEs starting with BE
- govobj for stranding with a copular relative clause
- Prepositional MWEs with lexcat of ADJ or ADV HOT 1
- ADP + NOUN + ADP MWEs HOT 1
- Add missing sentence? HOT 2
- Paragraph boundaries
- false negatives for a_little
- govobj: "for over" where "over" is an Approximator HOT 1
- buy with: Instrument/Cost HOT 1
- what gui annotation tool is used for annotating streusle corpus ? HOT 1
- How do you run Streusle against a sentence to get the labels ? HOT 1
- govobj: "out-of-place" HOT 2
- Break up "belong to" MWE, mark "to" as Possessor~Goal
- pssid: consider adding some MWE heuristics
- send new release to PyPI HOT 2
- "judge by" etc.: Instrument should be Characteristic? HOT 2
- missing import: tags2sst in pssid/identify.py HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from streusle.