-
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
modified common_data_es.py to match PT #34
base: master
Are you sure you want to change the base?
Conversation
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.
Well, I've reviewed the files. Since one year has passed, I think many of the functions on the spanish parser, which wasn't working properly then, now probably will be pretty outdated, but I corrected some orthographic errors and pointed some useless files I PR'ed by mistake.
@@ -0,0 +1,3 @@ | |||
{ | |||
"python.pythonPath": ".venv/bin/python" | |||
} |
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.
ignore this file
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.
if the refactor doesn't ignore this file, i'll hit .gitignore with the mother of all wildcards, because i'm having the same problem
"console": "integratedTerminal" | ||
} | ||
] | ||
} |
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.
ignore this file
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.
master
should now ignore .vscode/
, that'll get hit in the rebase. the refactor also ignores a couple other things, like .code-workspace, but i don't think i quite got settings files
"veintisiete": 27, | ||
"veintiocho": 28, | ||
"veintinueve": 29, | ||
"treinta": 30, | ||
"cuarenta": 40, | ||
"cincuenta": 50, | ||
"cinquenta": 50, |
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.
cincuenta
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.
my bad, i guess i've been spelling that wrong since kindergarten
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.
you have been spelling portuguese by mistake :D
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.
oh, wait, i misunderstood. that's a relief, i was pretty embarrassed for a while there.
clarified: it should be cincuenta. this PR accidentally would've made it cinquenta as an artifact from pt.
@@ -73,8 +111,8 @@ | |||
"ciento": 100, | |||
"doscientos": 200, | |||
"doscientas": 200, | |||
"trescientos": 300, | |||
"trescientas": 300, | |||
"trecientos": 300, |
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.
trescientos
"trescientos": 300, | ||
"trescientas": 300, | ||
"trecientos": 300, | ||
"trecientas": 300, |
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.
trescientas
# relevant plurals, cant just extract all s in es | ||
wordlist = ["mañanas", "noches", "tardes", "dias", "semanas", "años", | ||
"minutos", "segundos", "nas", "nos", "proximas", | ||
"seguintes", "horas"] |
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.
wordlist = ["mañanas", "noches", "tardes", "dias", "semanas", "años",
"minutos", "segundos", "las", "los", "proximas","proximos",
"siguientes", "horas"]
lang='es'), 'test 0 10 11 12 13') | ||
self.assertEqual(normalize('test mil seiscientos sesenta y seis', | ||
lang='es', remove_articles=False), | ||
'test 1000 600 60 y 6') |
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 should be 1666
'test 1000 600 60 y 6') | ||
self.assertEqual(normalize('test siete y medio', | ||
lang='es', remove_articles=False), | ||
'test 7 y 0.5') |
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 should be 7.5
lang='es'), 'test 2 punto 9') | ||
self.assertEqual(normalize('test ciento nueve', | ||
lang='es', remove_articles=False), | ||
'test 100 9') |
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 should be 109
self.assertEqual(extract_numbers('esto es test diez once doce', | ||
lang='es'), [10.0, 11.0, 12.0]) | ||
self.assertEqual(extract_numbers('test doce gatos veintiuno', | ||
lang='es'), [21.0, 12.0]) |
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 should be [12.0, 21.0]
(I'll probably get to this before you do) rebase on |
No description provided.