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

modified common_data_es.py to match PT #34

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

modified common_data_es.py to match PT #34

wants to merge 4 commits into from

Conversation

adocampo
Copy link
Contributor

No description provided.

@devs-mycroft devs-mycroft added the CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors) label Nov 3, 2019
@JarbasAl JarbasAl added the es relates to spanish language label Dec 23, 2019
Copy link
Contributor Author

@adocampo adocampo left a 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"
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ignore this file

Copy link
Contributor

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"
}
]
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ignore this file

Copy link
Contributor

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,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

cincuenta

Copy link
Contributor

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

Copy link
Collaborator

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

Copy link
Contributor

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,
Copy link
Contributor Author

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,
Copy link
Contributor Author

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"]
Copy link
Contributor Author

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')
Copy link
Contributor Author

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')
Copy link
Contributor Author

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')
Copy link
Contributor Author

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])
Copy link
Contributor Author

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]

@ChanceNCounter
Copy link
Contributor

(I'll probably get to this before you do) rebase on chance/refactor/languages_cleanup, or just wait a few days and rebase on upstream/master, one of the merge conflicts will take care of .gitignore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors) es relates to spanish language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants