-
Notifications
You must be signed in to change notification settings - Fork 79
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
adding german JSON-normalizer / changes to extract_datetime_de #175
Open
emphasize
wants to merge
14
commits into
MycroftAI:master
Choose a base branch
from
emphasize:fix_extractdatetime_de
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6267fc1
fix extract_datetime offset-aware/naive bug
emphasize bafc771
lower wordnext check to > 60
emphasize 18712f6
extract tzinfo from extractedDate instead of default_timezone()
emphasize a3cbd59
datetime parsing: No restriction to year, added ValueError exception
emphasize 8a6d1d0
datetime parsing: No restriction to year, added ValueError exception
emphasize 25119a5
normalizer -> json
emphasize 85c6ae1
revert changes to temp to reflect #180
emphasize 8830769
add german normalizer
emphasize 7460cfd
remove wrong entries in word_replacements
emphasize 0089d23
set remove_articles=True
emphasize f9287e2
add ein, eine,... to normalizer
emphasize a222c6a
extractnumber -> extract_number
emphasize 6f11610
add test
emphasize 4f85ac6
add test
emphasize File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"lowercase": false, | ||
"numbers_to_digits": true, | ||
"expand_contractions": true, | ||
"remove_symbols": false, | ||
"remove_accents": false, | ||
"remove_articles": false, | ||
"remove_stopwords": false, | ||
"contractions": { | ||
"am": "an dem", | ||
"ans": "an das", | ||
"aufs": "auf das", | ||
"beim": "bei dem", | ||
"durchs": "durch das", | ||
"fürs": "für das", | ||
"hinterm": "hinter dem", | ||
"ins": "in das", | ||
"im": "in dem", | ||
"übers": "über das", | ||
"unters": "unter das", | ||
"unterm": "unter dem", | ||
"vom": "von dem", | ||
"vors": "vor das", | ||
"vorm": "vor dem", | ||
"zum": "zu dem" | ||
}, | ||
"word_replacements": {}, | ||
"number_replacements": { | ||
"null": "0", | ||
"ein" : "1", | ||
"eins" : "1", | ||
"eine" : "1", | ||
"einer" : "1", | ||
"einem" : "1", | ||
"einen": "1", | ||
"eines": "1", | ||
"zwei": "2", | ||
"drei": "3", | ||
"vier": "4", | ||
"fünf": "5", | ||
"sechs": "6", | ||
"sieben": "7", | ||
"acht": "8", | ||
"neun": "9", | ||
"zehn": "10", | ||
"elf": "11", | ||
"zwölf": "12", | ||
"dreizehn": "13", | ||
"vierzehn": "14", | ||
"fünfzehn": "15", | ||
"sechzehn": "16", | ||
"siebzehn": "17", | ||
"achtzehn": "18", | ||
"neunzehn": "19", | ||
"zwanzig": "20", | ||
"einundzwanzig": "21", | ||
"zweiundzwanzig": "22", | ||
"dreiundzwanzig": "23", | ||
"vierundzwanzig": "24", | ||
"dreißig": "30", | ||
"vierzig": "40", | ||
"fünfzig": "50", | ||
"sechzig": "60", | ||
"siebzig": "70", | ||
"achtzig": "80", | ||
"neunzig": "90" | ||
}, | ||
"stopwords": [], | ||
"articles": [ | ||
"der", | ||
"die", | ||
"das", | ||
"dem", | ||
"den", | ||
"des" | ||
] | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this might need changing depending on #180
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i thought so, yet i don't found a change in other parsers.
What about..
in case of extract_datetime('today'). If coupled with a to_utc() (problem with weatherskill atm) this is causing possible dateime jumps.
wouldn't do harm if this is replaced also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the issue im anticipating is the
temp
datetime being a naive datetime, it will cause an issue with timezones, in #180 you can see i changed that step in every language to add the timezone to thetemp
datetime