Giter Site home page Giter Site logo

Comments (4)

eliotw avatar eliotw commented on July 17, 2024

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.

cannawen avatar cannawen commented on July 17, 2024

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.

eliotw avatar eliotw commented on July 17, 2024

Yes. So with the previous exmaple, the original logic would require two conditions to be true.

  1. The post contains "oz" but not "fl oz"". This is true.
  2. 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.

cannawen avatar cannawen commented on July 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.