Incorrect abbreviation of 'millions' in locale DE
- Dominant language
- Haskell
- Stars
- 4.3k
- Forks
- 740
- PR merge metrics
- No merged PRs in 30d
Description
## Steps to reproduce
- Send `curl -XPOST http://0.0.0.0:8000/parse --data 'locale=de_DE&text=30m'`
- The result is:
```[{"body":"30m","start":0,"value":{"value":30,"type":"value","unit":"metre"},"end":3,"dim":"distance","latent":false},{"body":"30m","start":0,"value":{"value":30000000,"type":"value"},"end":3,"dim":"number","latent":false}]```
## Expected result:
```[{"body":"30m","start":0,"value":{"value":30,"type":"value","unit":"metre"},"end":3,"dim":"distance","latent":false}```
## What's wrong
The second result body is incorrect because '30m' cannot mean '30 million' under locale de_DE. In German, 'million' is abbreviated 'Mio.' (see [Wikipedia](https://de.wikipedia.org/wiki/Million)). Unlike in English, 'million' is never abbreviated "M" (let alone "m") as this would be too ambiguous ("Meter" vs. "Millionen" vs. "Milliarden").
## Variation: dim=number
Let's change our request to restrict the dim to 'number':
- Send `curl -XPOST http://0.0.0.0:8000/parse --data 'locale=de_DE&dims="["number"]"&text=30m'`
- The result is `[{"body":"30m","start":0,"value":{"value":30000000,"type":"value"},"end":3,"dim":"number","latent":false}]`
Now, the expected behavior would be to simply ignore the 'm' and extract the number 30.
Contributor guide
Assessment
This issue has not been assessed yet.