Comments (3)
That's a good idea and something I've vaguely thought about before, but I'll definitely add it to my list of enhancements.
You're also right that it hopefully shouldn't involve too much refactoring. I'll take a look in the next couple of days and see how it goes!
from errant.
I hadn't thought of using subprocess
- that's a good point, although you're right that it's pretty ugly.
In terms of a PR, to be honest I was going to try and change as little as possible, by just refactoring the existing code slightly so that there was some kind of entry point function and a way to get the output as a dict
of strings. I think what you're suggesting with the Edit objects probably makes more sense, so I'm not sure it's worth me producing a hacky PR. If I end up with extra time on my hands I'll give a rewrite using Edit objects a try and send you that as a PR, but it's also likely not anything I can do soon.
Fortunately I don't urgently need this, so it's enough for me if one of us gets to it at some point. If I find time and start working on a PR I'll post another comment so we don't end up doing the same work twice; otherwise, if/when you get to it I'll try to be your first user.
from errant.
Hmm, having looked into it and thought about it a bit more, I think it will require a bit more work than I anticipated.
The evaluation script is currently a standalone script that stores edits as lists, but I would probably want to convert them to Edit objects for full integration into ERRANT; otherwise it seems messy to compare hypothesis Edit objects against reference edit lists (or not use Edit objects at all). That's something I can still do, but it will require changing almost all the eval functions, so don't expect anything soon!
In the mean time, feel free to work on something yourself and submit a PR. I can't promise I'll accept it, but it should at least give me a better idea on how to implement this in the future. Alternatively, you could also try running errant_compare
as a subprocess
and then processing the stdout. It's ugly, but it should work.
from errant.
Related Issues (20)
- How can I transform the M2 back to plain text HOT 2
- Errant for Arabic language HOT 2
- Errant incompatible with spacy 3 HOT 9
- Merge Casing Issue HOT 2
- Handling Missing Annotations on certain sentence HOT 5
- Edits missed for a substitute -> Delete -> Substitute sequence. HOT 3
- OSError: [E053] Could not read meta.json from en\meta.json HOT 3
- Implementation issue HOT 6
- UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2490: ordinal not in range(128) HOT 2
- Parallel_to_m2 is not working HOT 1
- Licensing concerns HOT 6
- Errant parse method not working HOT 5
- Wrong format for incorr_sentences.txt HOT 4
- ‘’AttributeError: 'English' object has no attribute 'tagger'” when running the "Quick Start" code in API given in README.md HOT 4
- Ignore temporary files generated by installation HOT 1
- cancelling
- Edit indices HOT 3
- Simulate Errors HOT 1
- API Quickstart script not working - Please update with fix provided HOT 2
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 errant.