Skip to content

Commit

Permalink
stop using french canonical form (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanVukovic99 authored Dec 1, 2024
1 parent 7779142 commit e52d07b
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 3-tidy-up.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ function getCanonicalWordForm({word, forms}) {
case 'ru':
return getCanonicalForm(word, forms); // canonical form is known to contain accent marks and such
case 'de':
// case 'fr': // canonical form sometimes just prepends the definite article, but many differ from the word in apostrophe variant. I don't know which is used in practice so leaving it until there's a yomitan preprocessor for french apostrophe usage.
case 'fr':
case 'en':
return word; // canonical form is redundant, e.g. just prepends the definite article
default:
Expand Down
7 changes: 7 additions & 0 deletions data/test/dict/fr/en/tag_bank_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,12 @@
-1,
"noun",
1
],
[
"adv",
"partOfSpeech",
-1,
"adverb",
1
]
]
78 changes: 78 additions & 0 deletions data/test/dict/fr/en/term_bank_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -806,5 +806,83 @@
],
0,
""
],
[
"d'accord",
"",
"adv",
"adv",
0,
[
{
"type": "structured-content",
"content": [
{
"tag": "div",
"content": [
"in agreement [with avec ‘someone’]",
{
"tag": "div",
"data": {
"content": "extra-info"
},
"content": {
"tag": "div",
"data": {
"content": "example-sentence"
},
"content": [
{
"tag": "div",
"data": {
"content": "example-sentence-a"
},
"content": "Oui, je suis d’accord avec vous."
},
{
"tag": "div",
"data": {
"content": "example-sentence-b"
},
"content": "Yes, I agree with you."
}
]
}
},
{
"tag": "div",
"data": {
"content": "extra-info"
},
"content": {
"tag": "div",
"data": {
"content": "example-sentence"
},
"content": [
{
"tag": "div",
"data": {
"content": "example-sentence-a"
},
"content": "tomber d’accord"
},
{
"tag": "div",
"data": {
"content": "example-sentence-b"
},
"content": "to reach an agreement, to agree"
}
]
}
}
]
}
]
}
],
0,
""
]
]
13 changes: 13 additions & 0 deletions data/test/ipa/fr/en/term_meta_bank_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,18 @@
}
]
}
],
[
"d'accord",
"ipa",
{
"reading": "d'accord",
"transcriptions": [
{
"ipa": "/d‿a.kɔʁ/",
"tags": []
}
]
}
]
]
3 changes: 2 additions & 1 deletion data/test/kaikki/fr-en.json

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions data/test/tidy/fr-en-lemmas.json
Original file line number Diff line number Diff line change
Expand Up @@ -468,5 +468,49 @@
}
}
}
},
"d'accord": {
"d'accord": {
"adv": {
"0": {
"ipa": [
{
"ipa": "/d‿a.kɔʁ/",
"tags": []
}
],
"glossTree": {
"_type": "map",
"map": [
[
"in agreement [with avec ‘someone’]",
{
"_type": "map",
"map": [
[
"_tags",
[]
],
[
"_examples",
[
{
"text": "Oui, je suis d’accord avec vous.",
"translation": "Yes, I agree with you."
},
{
"text": "tomber d’accord",
"translation": "to reach an agreement, to agree"
}
]
]
]
}
]
]
}
}
}
}
}
}

0 comments on commit e52d07b

Please sign in to comment.