facebook / duckling

Language, engine, and tooling for expressing, testing, and evaluating composable language rules on input strings.
Other
4.05k stars 723 forks source link

Quantity/PT: Extend quantity to include grams in portuguese #631

Closed mairatma closed 3 years ago

mairatma commented 3 years ago

I'm using Duckling in my project but I noticed that quantities in kg weren't being detected correctly, though other entities such as numeral/volume were all working as expected. Investigating more I noticed that this was just because in Portuguese the Quantity entity was only configured to detect cups and pounds, never grams. And even for cups/pounds, products weren't being detected correctly.

So I've just adapted the rules from English Quantity to work in Portuguese as well, while keeping the cups/pounds too. It's all working as expected now and it's backwards compatible.

facebook-github-bot commented 3 years ago

Hi @mairatma!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

facebook-github-bot commented 3 years ago

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

mairatma commented 3 years ago

Sorry, I thought that the tests had passed locally but I missed one! Looking into this and I'll let you know here once it's ready for review.

mairatma commented 3 years ago

This is really ready now, all tests pass locally:

Screen Shot 2021-07-13 at 11 48 54

Sorry for the confusion!

facebook-github-bot commented 3 years ago

@chessai has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

mairatma commented 3 years ago

Hey @chessai, I've seen that there was some kind of build/test failure but I don't have the details as it seems to be internal to Facebook this time. Can you let me know what it was?

chessai commented 3 years ago

Hey @chessai, I've seen that there was some kind of build/test failure but I don't have the details as it seems to be internal to Facebook this time. Can you let me know what it was?

Hi @mairatma, the internal build failure is transient. I've restarted internal CI, but I don't know if the UI will update here. I should be merging this PR today. Thanks!

mairatma commented 3 years ago

@chessai thanks so much!

facebook-github-bot commented 3 years ago

@chessai merged this pull request in facebook/duckling@328e59ebc4df34ccf3276a2a54eca598bfbc7e6b.

mairatma commented 3 years ago

Hey @chessai, do you know when a new version including this will be published? Thanks again!

chessai commented 3 years ago

Hey @mairatma, good question. I was planning on doing another release in August. For now you should just pull from master branch.