Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DE] Issue with years before 1900 #102

Closed
hdlj opened this issue May 11, 2018 · 2 comments
Closed

[DE] Issue with years before 1900 #102

hdlj opened this issue May 11, 2018 · 2 comments
Assignees
Labels

Comments

@hdlj
Copy link
Collaborator

hdlj commented May 11, 2018

Parsing Error

Version

0.17.0

Language

DE

Parser input

"das jahr 1905"
"das jähr 1890"

Parser output

Time(TimeOutput { moment: 1970-01-01T00:59:59+01:00, grain: Year, precision: Exact, latent: false })

Parser expected output (Optional)

Time(TimeOutput { moment: 1890-01-01T00:00:00+01:00, grain: Year, precision: Exact, latent: false })
@hdlj hdlj self-assigned this May 11, 2018
@hdlj hdlj added the bug label May 11, 2018
@rosastern rosastern assigned rosastern and unassigned hdlj Oct 23, 2018
@rosastern rosastern added the fix label Oct 23, 2018
@koenvervloesem
Copy link

koenvervloesem commented Nov 26, 2018

I encountered a similar issue in English, with rustling-ontology 0.17.5.

"November 26 1994" is parsed correctly:

koan@x1:~/rustling-ontology/cli$ cargo run -- --lang en parse "November 26 1994"
    Finished dev [unoptimized + debuginfo] target(s) in 0.09s
     Running `/home/koan/rustling-ontology/target/debug/rustling-cli --lang en parse 'November 26 1994'`
+----+------------+-----------+------------------+-----------------------------------------------------------------------------------------------------+
| ix | log(p)     | p         | text             | value                                                                                               |
+====+============+===========+==================+=====================================================================================================+
| 0  | -0.4431368 | 0.6420194 | november 26 1994 | Time(TimeOutput { moment: 1994-11-26T00:00:00+01:00, grain: Day, precision: Exact, latent: false }) |
+----+------------+-----------+------------------+-----------------------------------------------------------------------------------------------------+

But "November 26 1894" isn't, because "1894" is parsed as an Integer:

koan@x1:~/rustling-ontology/cli$ cargo run -- --lang en parse "November 26 1894"
    Finished dev [unoptimized + debuginfo] target(s) in 0.09s
     Running `/home/koan/rustling-ontology/target/debug/rustling-cli --lang en parse 'November 26 1894'`
+----+--------------+------------+------------------+-----------------------------------------------------------------------------------------------------+
| ix | log(p)       | p          | text             | value                                                                                               |
+====+==============+============+==================+=====================================================================================================+
| 1  | -0.072079904 | 0.9304565  | ____________1894 | Integer(IntegerOutput(1894))                                                                        |
+----+--------------+------------+------------------+-----------------------------------------------------------------------------------------------------+
| 0  | -0.17216337  | 0.84184164 | november 26_____ | Time(TimeOutput { moment: 2018-11-26T00:00:00+01:00, grain: Day, precision: Exact, latent: false }) |
+----+--------------+------------+------------------+-----------------------------------------------------------------------------------------------------+

@rosastern
Copy link
Collaborator

Check together with #155
Closing this one and working on #155

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants