chrisjbryant / errant

ERRor ANnotation Toolkit: Automatically extract and classify grammatical errors in parallel original and corrected sentences.
MIT License
440 stars 107 forks source link

Update ERRANT to use with spaCy 3 #41

Closed Frost45 closed 1 year ago

Frost45 commented 2 years ago

Our team is working on using ERRANT with our own custom tokenisation.

As a result, we have updated this repo to work with spaCy 3.

Any comments and suggestions are much appreciated!

Closes #24

chrisjbryant commented 2 years ago

Hey! Thanks for this! I had a quick look, and everything seems good, but I'll try to work on evaluating the speed at some point.

Frost45 commented 2 years ago

Sounds good! Thank you for taking a look :)

akesh1235 commented 1 year ago

@chrisjbryant @Frost45

I got this error

File "C:\Users\inti004\Desktop\apideployenv\Lib\site-packages\errant\annotator.py", line 26, in parse text = self.nlp(text) ^^^^^^^^^^^^^^

TypeError: Argument 'string' has incorrect type (expected str, got spacy.tokens.doc.Doc)

chrisjbryant commented 1 year ago

What command are you running? Or is this your own script? That error makes me think you're passing text that has already been processed by spacy to errant, in which case you don't need to parse it again.

chrisjbryant commented 1 year ago

I finally got around to doing this myself and running some tests etc. Sorry about the delay!