Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Conversions fix #4506

Merged
merged 2 commits into from Jan 30, 2018
Merged

Conversions fix #4506

merged 2 commits into from Jan 30, 2018

Conversation

hektr
Copy link

@hektr hektr commented Sep 23, 2017

Conversions

Description of new Instant Answer, or changes

now conversions IA can answer at questions, composed not only like this "how many metres [are] in a mile?" but also like this "how many metres are there in a mile?" or "how many metres are in 2 miles?".

Related Issues and Discussions

Fixes #4502 Fixed #4501

People to notify


Instant Answer Page: https://duck.co/ia/view/conversions

@daxtheduck
Copy link

daxtheduck commented Sep 23, 2017

Conversions

Description: convert between various units of measurement

Example Query: convert 5 oz to grams, 5 ounces to g, 0.5 nautical miles in km

Tab Name: Answer

Source:

These are the important fields from the IA page. Please check these for errors or missing information and update the IA page


This is an automated message which will be updated as changes are made to the IA page

Copy link
Contributor

@pjhampton pjhampton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments.

@@ -695,6 +695,22 @@ ddg_goodie_test(
physical_quantity => 'length'
})
),
'how many metres are in 10 yards?' => test_zci(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the original problem is that they do already trigger on are in, but not in. This test should be how many metres in 10 yards?
You can get rid of the test below and a couple more like this that aren't metres / yards.

Copy link
Author

@hektr hektr Sep 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this question good ? how many kilobytes are in 2Tb? That regexp doesn't match it, because prefix-left_num are in is not followed by a. You can only write something like how many bytes are in a kilobyte? but not how many bytes are in kilobyte? If you omit "a" after are in in your request, regexp doesn't match and nothing triggers. But you can write this how many tsp are in a 1 tbsp and it triggers and even gives correct result. So, you can just add ?-quatifier after the corresponding a letter at regexp and it will give chance to people with bad english to know, how many bytes are in kilobyte or in 2 kilobytes.

@moollaza moollaza changed the base branch from master to zaahir/conversions-are-in January 30, 2018 03:44
@moollaza
Copy link
Member

Merging to my own branch to test + continue as original branch no longer exists

@moollaza moollaza merged commit 389edd9 into duckduckgo:zaahir/conversions-are-in Jan 30, 2018
moollaza added a commit that referenced this pull request Jan 30, 2018
* conversions fix

* correction
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants