Polish audio TN - #470
Polish audio TN#470jimregan wants to merge 31 commits into
Conversation
Signed-off-by: Jim O'Regan <joregan@kth.se>
for more information, see https://pre-commit.ci
Signed-off-by: Jim O'Regan <joregan@kth.se>
for more information, see https://pre-commit.ci
Signed-off-by: Jim O'Regan <joregan@kth.se>
Signed-off-by: Jim O'Regan <joregan@kth.se>
Signed-off-by: Jim O'Regan <joregan@kth.se>
for more information, see https://pre-commit.ci
Signed-off-by: Jim O'Regan <joregan@kth.se>
…into polish-tn Signed-off-by: Jim O'Regan <joregan@kth.se>
Signed-off-by: Jim O'Regan <joregan@kth.se>
Signed-off-by: Jim O'Regan <joregan@kth.se>
Signed-off-by: Jim O'Regan <joregan@kth.se>
for more information, see https://pre-commit.ci
Signed-off-by: Jim O'Regan <joregan@kth.se>
Signed-off-by: Jim O'Regan <joregan@kth.se>
for more information, see https://pre-commit.ci
Signed-off-by: Jim O’Regan <joregan@kth.se>
|
This PR is stale because it has been open for 14 days with no activity. Remove stale label or comment or update or this will be closed in 7 days. |
Note that Google Translate's TTS can manage 0,00000000000000001 ("zero i jedna stubiliardowa") but higher than that it becomes stupid: 0,000000000000000001 comes out as "zero jeden przez zero...(18 times)" ("zero one divided by zero zero etc.")
Signed-off-by: Jim O'Regan <joregan@kth.se>
| pl_acc ny | ||
| pl_ins nami | ||
| pl_loc nach | ||
| pl_voc ny No newline at end of file |
There was a problem hiding this comment.
there is something about new line different that in other files, i am not sure if that is important.
There was a problem hiding this comment.
That's likely just an artifact of his editor. Not a problem for the parser.
| pl_nom le | ||
| pl_gen l | ||
| pl_dat lom | ||
| pl_acc li |
There was a problem hiding this comment.
that does not generalize by ending, i think there is some other word feature other than ending and genus in play. e.g.
sg_nom "fala" (wave) pl_acc is "fale", not "fali" as this file suggests.
but it works for names:
sg_nom "Ala" produces pl_acc "Ali".
There was a problem hiding this comment.
It's only used with names at the moment (specifically, names of queens or saints to disambiguate a trailing roman numeral or a leading 'św.' respectively)
| sg_nom <eps> | ||
| sg_gen a | ||
| sg_dat owi | ||
| sg_acc <eps> |
There was a problem hiding this comment.
here again the rule is more complex than ending alone, but this time i happen to know it has something to do with the object being inanimate vs animate (person, animal, plant). e.g.:
"kolec" (spike) sg_acc is "kolec", while animate thing like "golec" in sg acc becomes "golca".
if "mi" in the file name stands for "male inanimate", the it dismisses the comment, but then there is no "mp_c" file
There was a problem hiding this comment.
This is intended for [^e]c, I would have had noun_mi_ec.tsv for the case you're describing, and sg_nom would be 'ec' because the e is deleted. Same with -iec, same with -zec for marzec.
It would probably be easier to follow if I were to name everything in terms of a specific noun but I don't honestly imagine that anybody else will be working on this.
| @@ -0,0 +1,14 @@ | |||
| sg_nom m | |||
| sg_gen ma | |||
There was a problem hiding this comment.
not sure if "mi" is "male inanimate", but assuming that -- this is wrong, e.g.:
sg nom "szlam" (sludge) -> sg gen "szlamu"
sg nom "szlem" (slem) -> sg gen "szlemu"
sg nom "dżem" (jam) -> sg gen "dżemu"
so i think it should be "mu"
| @@ -0,0 +1,14 @@ | |||
| sg_nom r | |||
| sg_gen ra | |||
There was a problem hiding this comment.
"ru" if it's for inanimate, otherwise "ra" is fine.
e.g.
"katar" (a cold, inanimate) -> "kataru"
"Tatar" (Tatar nation, animate) -> "Tatara"
There was a problem hiding this comment.
In the types of words that tend to come up in normalisation, it tends to be -a for inanimate (cetnar -> cetnara)
| @@ -0,0 +1,24 @@ | |||
| 1 dziesiąty | |||
There was a problem hiding this comment.
"dziesiętny", if it is about denominators.
There was a problem hiding this comment.
Maybe the file is poorly named, but it's decimal denominators purely, so for decimal I,D if len(D) == 1, the denominator is "tenth", len(D) == 2, "hundredth", etc.
There was a problem hiding this comment.
the title says "denominators", but then list all the words suggesting that they are male. we typically refer to fractions as females, so "0,1" reads "zero i jedna dziesiąta" (zero and one tenth, where "thenth" is female, thus "-a", not "-y").
i am not sure what the purpose of this file is, but if its to produce TTS of "0,001" and so one, that should all end with -a instead of -y
but then it becomes plural if its anything other than "1", so e.g. "0,2" is "0 i 2 dziesiętne", "0,3" is "0 i 3 dziesiętne" etc. + above 5 it becomes "0 i 5 dziesiętnych".
note that i am not bothering you here with how to read and write numbers on purpose, because that thing alone is a huge decision tree.
There was a problem hiding this comment.
Adjectives are relatively regular in terms of inflection, this is reusing the same mechanism that's used for ordinals.
| o 4.25~o czwartej dwadzieścia pięć | ||
| o godz. 21:14~o godzinie dwudziestej pierwszej czternaście | ||
| 4:25~czwarta dwadzieścia pięć | ||
| 04:25:07~czwarta dwadzieścia pięć siedem |
There was a problem hiding this comment.
This sounds too much machine style. The human would say:
"czwarta dwadzieścia pięć i siedem sekund"
| o godz. 21:14~o godzinie dwudziestej pierwszej czternaście | ||
| 4:25~czwarta dwadzieścia pięć | ||
| 04:25:07~czwarta dwadzieścia pięć siedem | ||
| 00:00:00~zero zero zero |
There was a problem hiding this comment.
similar here, human would say: "północ" -> midnight
| zero przecinek zero zero zero zero zero zero zero zero zero zero zero zero zero zero zero zero zero zero zero zero zero zero zero dwa | ||
| ~1,5 | ||
| jeden i pięć dziesiątych | ||
| jeden przecinek pięć |
There was a problem hiding this comment.
"jeden i pół" is perfectly fine here and to me that would be the most obvious one
There was a problem hiding this comment.
Yes, reading the decimal as a fraction would be more natural, but that's a specific set of exceptions to normal decimal handling. This is a draft, I'll get to it when I have time.
Maybe having a simple example here is misleading? 1,5 looks quite clear cut, but 1,56734 less so.
| ~1,5 kg | ||
| jeden i pięć dziesiątych kilograma | ||
| jeden przecinek pięć kilograma | ||
| półtora kilograma |
There was a problem hiding this comment.
"jeden i pół kilograma" is perfectly fine here as well
Signed-off-by: Jim O'Regan <joregan@kth.se>
…absent from the test) Signed-off-by: Jim O'Regan <joregan@kth.se>
| @@ -0,0 +1,14 @@ | |||
| sg_nom t | |||
| sg_gen ta | |||
There was a problem hiding this comment.
if its for "male inanimate", it should be "-tu", as in:
"blat"(couneter) -> sg gen "blatu"
for animate things its fine, e.g. "kot" (cat) -> sg gen "kota"
There was a problem hiding this comment.
wat -> wata
Again, the point here is not to provide general inflection tables, but to target the kind of words that appear in normalisation, which overwhelmingly tend to have genitives in -a, not -u
Signed-off-by: Jim O'Regan <joregan@kth.se>
| mm milimetr mi noun_mi_r.tsv | ||
| l litr mi noun_mi_r.tsv | ||
| ml mililitr mi noun_mi_r.tsv | ||
| g gram mi noun_mi_m.tsv |
Signed-off-by: Jim O'Regan <joregan@kth.se>
for more information, see https://pre-commit.ci
What does this PR do ?
Audio TN for Polish. Also TN, but that has too many non-determinisms to care about
Before your PR is "Ready for review"
Pre checks:
git commit -sto sign.pytestor (if your machine does not have GPU)pytest --cpufrom the root folder (given you marked your test cases accordingly@pytest.mark.run_only_on('CPU')).bash tools/text_processing_deployment/export_grammars.sh --MODE=test ...pytestand Sparrowhawk here.__init__.pyfor every folder and subfolder, includingdatafolder which has .TSV files?Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.to all newly added Python files?Copyright 2015 and onwards Google, Inc.. See an example here.try import: ... except: ...) if not already done.PR Type:
If you haven't finished some of the above items you can still open "Draft" PR.