Comments (1)
Hi,
thanks for sharing your feedback. However, I am afraid there is no straight forward solution to your problem, at least none that I am seeing. ctparse
by nature is not perfect but rather tries to generate the best possible match. I.e. as long as there is one rule that generates at least one production, that will be returned.
To mitigate your issue you can build auxiallary logic on the meta data in the response:
res = ctparse("how are you?")
# the score can be understood as log-quality - very small values like this are a sign of low quality
res.score
# how much of the original text was used for this response? If that is just a small part (here 1/4) there is likely something fishy
len(res.resolution) / len("how are you?")
I hope that helps.
from ctparse.
Related Issues (20)
- Parse string of the type "7.6 evening/night"
- Time expression of the kind am 21.10.2015 früh 06:55 parse incorrectly HOT 4
- Time expression hangs ctparse when timeout=0 and max_stack_depth=0 HOT 2
- from Tuesday to Friday HOT 1
- Month and Year not joined
- Remove dependencies on sklearn HOT 1
- Time expression "Montag 9. März bis Mittwoch 11. März" doesn't parse correctly
- Time expression "02 Mär 2020 - 03 Mär 2020" fails to parse correctly
- Intervals of the kind "ab dem xx.xx.xx-xx.xx.xx" parsed incorrectly HOT 1
- The duration of "1 hour and 42 minutes" returns just 42 minutes, debug returns the values correctly HOT 3
- strings ctparse can't parse HOT 1
- parsing time intervals incorrectly HOT 2
- obsolete documentation HOT 2
- [Question] adding new attribute to Time object HOT 2
- Parse simple US dates
- `latent_time=False` works only half-way HOT 1
- Time interval parsing issues
- Year gets parsed as hours and minutes HOT 3
- Get TimeDelta from Duration 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 ctparse.