Comments (4)
I wonder if the scope of this should be limited to a single line/sentence. There maybe a case where a recipe will reference oz for something like a steak. But then reference a liquid later on. For example:
- 8 oz steak
- 2 tbsp olive oil
I can work on this.
from metric_units_reddit_bot.
Great, thanks for volunteering! You can find the relevant part of the code in this file. Feel free to reach out if you need any assistance :)
Can you clarify what you mean about limiting the scope to a line or sentence? In the above example you mentioned, the 8 oz should be considered a weight unit, and not volume.
from metric_units_reddit_bot.
Yes. So with the previous exmaple, the original logic would require two conditions to be true.
- The post contains "oz" but not "fl oz"". This is true.
- The post contains some liquid word. This could be satisfied by the word oil. However the oz was referring to the steak not the oil. But since the scope of where we are matching is the entire post, this condition would be satisfied.
Even limiting the scope of the match to a single line/sentence could be an issue if someone posted "8 oz steak and 1 tbsp olive oil"
from metric_units_reddit_bot.
Oh, I see what you mean (my mind didn't register that oil was a liquid - in my defence, it's late here, haha)... Yes, that's an excellent idea to limit it per line or sentence! Great catch :)
Hmm, you're right, there are definitely limitations to the approach. I think we should try it out, and we can always iterate if it doesn't work. I'm guessing/hoping the "8 oz steak and 1 tbsp olive oil" problem will be a super edge case
from metric_units_reddit_bot.
Related Issues (20)
- Refactor number parsing HOT 1
- Bug report: Add ignore keywords to "cups" for gaming sub reddits
- Feature request: Add unit `qt` = 1/4 gallon HOT 3
- Range conversion "30-50lb" converted to "30 lb50 lb ≈ 1423 kg"
- Scan the r/homebrewing thread and post constructive feedback in r/metric_units HOT 2
- Move documentation to /docs folder HOT 5
- bot off HOT 1
- Discussion - Discussions HOT 2
- Handle commas better HOT 16
- Always add L/100km conversion
- "oz" is not being converted to "troy oz" in subreddit /r/Pmsforsale HOT 27
- Ignore all nba subreddits for mpg HOT 10
- Ignore "cup" measurements over 100 HOT 2
- Feature request: Convert lbs/inch to kg/mm and N/m HOT 4
- Handle close numbers better HOT 1
- Conversions architecture overhaul
- Modify pressureMap to convert 10^5 pa to bar HOT 4
- Improve rounding HOT 4
- Bot should sass users who edit their comments to remove values HOT 7
- change footer links and text HOT 4
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 metric_units_reddit_bot.