-
-
Notifications
You must be signed in to change notification settings - Fork 16
Inflection 85: Updating Malayalam grammar.xml and following files #138
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
Open
deonajulary06
wants to merge
28
commits into
main
Choose a base branch
from
update-new-language-doc
base: main
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 26 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
e359163
Add Malayalam dictionary support
deonajulary06 a109f4e
Add Malayalam language support in LocaleUtils.hpp
deonajulary06 9fd9e01
Add Malayalam locale support to LocaleUtils
deonajulary06 72e7c28
Add Malayalam language to the tests
deonajulary06 95b483d
Add Malayalam locale group ml_IN
deonajulary06 681b568
ADD: Malayalam tokenizer configuration file
deonajulary06 bfa7ae6
Inflection-85: Add Git LFS config for Malayalam dictionary and XML files
deonajulary06 5aa7ec4
Add Malayalam inflection and pronoun tests
deonajulary06 f20350f
Updated copyright line
deonajulary06 9cc0a44
Updated copyright message
deonajulary06 4bb9964
Updated copright message
deonajulary06 a46c301
Updated language grammar to include Malayalam
deonajulary06 df82a8b
Added pronouns for Malayalam
deonajulary06 8fcfb16
Add ll GrammarSynthesizer files
deonajulary06 0c50978
Add Malayalam grammar synthesizer
deonajulary06 9523646
Add Malayalam-specific CommonConceptFactory with lists and quantities
deonajulary06 a8a7f2d
Update document on how to add a new language, fixed errors
deonajulary06 e60ea6f
Updated grammar.xml for Malayalam
deonajulary06 80af5bf
Update pronoun_ml.csv
deonajulary06 a70ad5e
Updated all grammar synthesizer component for Malayalam
deonajulary06 6a191b6
Update Common Concept Factory files
deonajulary06 421d0e4
Updated tests for Malayalam
deonajulary06 11d35cc
Fix Malayalam grammar synthesis and remove count lookup function
deonajulary06 de22098
Updated Grammeme Constants files to include sociative case
deonajulary06 367f745
Temporary fix for GitHub
deonajulary06 4786b2d
Modified files to fix more test errors
deonajulary06 f2b59c6
Update files to fix errors
deonajulary06 b7528a8
Same file as before but with corrected indentations
deonajulary06 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 hidden or 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
748,739 changes: 748,739 additions & 0 deletions
748,739
inflection/resources/org/unicode/inflection/dictionary/dictionary_ml.lst
Large diffs are not rendered by default.
Oops, something went wrong.
7,715 changes: 7,715 additions & 0 deletions
7,715
inflection/resources/org/unicode/inflection/dictionary/inflectional_ml.xml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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
83 changes: 83 additions & 0 deletions
83
inflection/resources/org/unicode/inflection/inflection/pronoun_ml.csv
This file contains hidden or 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,83 @@ | ||
എനിക്ക്,first,singular,dative,personal | ||
ഞാൻ,first,singular,nominative,exclusive,personal | ||
എന്നെ,first,singular,accusative,exclusive,personal | ||
എന്റെ,first,singular,genitive,determination=dependent,exclusive,personal | ||
എന്റേത്,first,singular,genitive,determination=independent,exclusive,personal | ||
നമുക്ക്,first,plural,dative,inclusive,personal | ||
ഞങ്ങൾ,first,plural,nominative,exclusive,personal | ||
ഞങ്ങളെ,first,plural,accusative,exclusive,personal | ||
ഞങ്ങൾക്ക്,first,plural,dative,exclusive,personal | ||
ഞങ്ങളുടെ,first,plural,genitive,exclusive,determination=dependent,personal | ||
ഞങ്ങളുടേത്,first,plural,genitive,exclusive,determination=independent,personal | ||
നമ്മുടെ,first,plural,genitive,inclusive,determination=dependent,personal | ||
നമ്മുടേതു്,first,plural,genitive,inclusive,determination=independent,personal | ||
നിനക്ക്,second,singular,dative,informal,personal | ||
നീ,second,singular,nominative,informal,personal | ||
നിനെ,second,singular,accusative,informal,personal | ||
നിന്റെ,second,singular,genitive,informal,determination=dependent,personal | ||
നിന്റേതു്,second,singular,genitive,informal,determination=independent,personal | ||
താങ്കൾ,second,singular,nominative,formal,personal | ||
താങ്കളെ,second,singular,accusative,formal,personal | ||
താങ്കൾക്ക്,second,singular,dative,formal,personal | ||
താങ്കളുടെ,second,singular,genitive,formal,determination=dependent,personal | ||
താങ്കളുടേതു്,second,singular,genitive,formal,determination=independent,personal | ||
നിങ്ങൾ,second,plural,nominative,formal,personal | ||
നിങ്ങളെ,second,plural,accusative,formal,personal | ||
നിങ്ങൾക്ക്,second,plural,dative,formal,personal | ||
നിങ്ങളുടെ,second,plural,genitive,formal,determination=dependent,personal | ||
നിങ്ങളുടേതു്,second,plural,genitive,formal,determination=independent,personal | ||
അവൻ,third,singular,nominative,masculine,personal,distal | ||
അവനെ,third,singular,accusative,masculine,personal,distal | ||
അവന്റെ,third,singular,genitive,masculine,determination=dependent,personal,distal | ||
അവന്റെത്,third,singular,genitive,masculine,determination=independent,personal,distal | ||
അവൾ,third,singular,nominative,feminine,personal,distal | ||
അവളെ,third,singular,accusative,feminine,personal,distal | ||
അവളുടെ,third,singular,genitive,feminine,determination=dependent,personal,distal | ||
അവളുടേതു്,third,singular,genitive,feminine,determination=independent,personal,distal | ||
അത്,third,singular,nominative,neuter,personal,distal | ||
അതിനെ,third,singular,accusative,neuter,personal,distal | ||
അതിന്റെ,third,singular,genitive,neuter,determination=dependent,personal,distal | ||
അതിന്റേതു്,third,singular,genitive,neuter,determination=independent,personal,distal | ||
അവർ,third,plural,nominative,personal,distal | ||
അവരെ,third,plural,accusative,personal,distal | ||
അവരുടെ,third,plural,genitive,determination=dependent,personal,distal | ||
അവരുടേതു്,third,plural,genitive,determination=independent,personal,distal | ||
എന്നിൽ,first,singular,locative,personal | ||
എന്നാൽ,first,singular,instrumental,personal | ||
എന്നോടു്,first,singular,sociative,personal | ||
ഞങ്ങളിലു്,first,plural,locative,exclusive,personal | ||
ഞങ്ങളാൽ,first,plural,instrumental,exclusive,personal | ||
ഞങ്ങളോടു്,first,plural,sociative,exclusive,personal | ||
നിനിൽ,second,singular,locative,informal,personal | ||
നിനാൽ,second,singular,instrumental,informal,personal | ||
നിനോടു്,second,singular,sociative,informal,personal | ||
താങ്കളിൽ,second,singular,locative,formal,personal | ||
താങ്കളാൽ,second,singular,instrumental,formal,personal | ||
താങ്കളോടു്,second,singular,sociative,formal,personal | ||
നിങ്ങളിൽ,second,plural,locative,formal,personal | ||
നിങ്ങളാൽ,second,plural,instrumental,formal,personal | ||
നിങ്ങളോടു്,second,plural,sociative,formal,personal | ||
അവനിൽ,third,singular,locative,masculine,personal,distal | ||
അവനാൽ,third,singular,instrumental,masculine,personal,distal | ||
അവനോടു്,third,singular,sociative,masculine,personal,distal | ||
അവളിൽ,third,singular,locative,feminine,personal,distal | ||
അവളാൽ,third,singular,instrumental,feminine,personal,distal | ||
അവളോടു്,third,singular,sociative,feminine,personal,distal | ||
അതിൽ,third,singular,locative,neuter,personal,distal | ||
അതാൽ,third,singular,instrumental,neuter,personal,distal | ||
അതോടു്,third,singular,sociative,neuter,personal,distal | ||
അവരിൽ,third,plural,locative,personal,distal | ||
അവരാൽ,third,plural,instrumental,personal,distal | ||
അവരോടു്,third,plural,sociative,personal,distal | ||
താൻ,third,singular,nominative,reflexive,personal | ||
തങ്ങൾ,third,plural,nominative,formal,reflexive,personal | ||
ഇവൻ,third,singular,nominative,masculine,proximal,personal | ||
ഇവൾ,third,singular,nominative,feminine,proximal,personal | ||
ഇത്,third,singular,nominative,neuter,proximal,personal | ||
ഇവർ,third,plural,nominative,proximal,personal | ||
എവൻ,third,singular,nominative,masculine,interrogative | ||
എവൾ,third,singular,nominative,feminine,interrogative | ||
എവർ,third,plural,nominative,interrogative | ||
ഏത്,third,singular,nominative,neuter,interrogative | ||
നമ്മൾ,first,plural,nominative,inclusive,personal | ||
നമ്മെ,first,plural,accusative,inclusive,personal |
This file contains hidden or 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
5 changes: 5 additions & 0 deletions
5
inflection/resources/org/unicode/inflection/tokenizer/config_ml.properties
This file contains hidden or 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,5 @@ | ||
# | ||
# Copyright 2025 Unicode Incorporated and others. All rights reserved. | ||
# | ||
tokenizer.implementation.class=DefaultTokenizer | ||
|
25 changes: 25 additions & 0 deletions
25
inflection/src/inflection/dialog/language/MlCommonConceptFactory.cpp
This file contains hidden or 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,25 @@ | ||
/* | ||
* Copyright 2025 Unicode Incorporated and others. All rights reserved. | ||
*/ | ||
|
||
#include <inflection/dialog/language/MlCommonConceptFactory.hpp> | ||
|
||
#include <inflection/dialog/SemanticFeatureConceptBase.hpp> | ||
#include <inflection/grammar/synthesis/GrammemeConstants.hpp> | ||
#include <inflection/npc.hpp> | ||
|
||
using inflection::grammar::synthesis::GrammemeConstants; | ||
|
||
namespace inflection::dialog::language { | ||
|
||
MlCommonConceptFactory::MlCommonConceptFactory(const ::inflection::util::ULocale& language) | ||
: super(language) | ||
{ | ||
} | ||
|
||
MlCommonConceptFactory::~MlCommonConceptFactory() | ||
{ | ||
} | ||
|
||
} // namespace inflection::dialog::language | ||
|
29 changes: 29 additions & 0 deletions
29
inflection/src/inflection/dialog/language/MlCommonConceptFactory.hpp
This file contains hidden or 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,29 @@ | ||
/* | ||
* Copyright 2025 Unicode Incorporated and others. All rights reserved. | ||
*/ | ||
#pragma once | ||
|
||
#include <inflection/dialog/language/fwd.hpp> | ||
#include <inflection/dialog/CommonConceptFactoryImpl.hpp> | ||
#include <inflection/grammar/synthesis/fwd.hpp> | ||
#include <inflection/dialog/Plurality.hpp> | ||
|
||
namespace inflection::dialog::language { | ||
|
||
class MlCommonConceptFactory : public CommonConceptFactoryImpl { | ||
using super = CommonConceptFactoryImpl; | ||
|
||
public: | ||
explicit MlCommonConceptFactory(const ::inflection::util::ULocale& language); | ||
~MlCommonConceptFactory() override; | ||
|
||
protected: | ||
::inflection::dialog::SpeakableString quantifyType( | ||
const ::inflection::dialog::SpeakableString& formattedNumber, | ||
const ::inflection::dialog::SemanticFeatureConceptBase& semanticConcept, | ||
bool useDefault, | ||
::inflection::dialog::Plurality::Rule countType) const override; | ||
}; | ||
|
||
} // namespace inflection::dialog::language | ||
|
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
25 changes: 25 additions & 0 deletions
25
inflection/src/inflection/grammar/synthesis/MlGrammarSynthesizer.cpp
This file contains hidden or 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,25 @@ | ||
/* | ||
* Copyright 2025 Apple Inc. All rights reserved. | ||
*/ | ||
#include <inflection/grammar/synthesis/MlGrammarSynthesizer.hpp> | ||
|
||
#include <inflection/dialog/SemanticFeatureModel.hpp> | ||
#include <inflection/grammar/synthesis/MlGrammarSynthesizer_NumberLookupFunction.hpp> | ||
#include <inflection/grammar/synthesis/MlGrammarSynthesizer_GenderLookupFunction.hpp> | ||
#include <inflection/grammar/synthesis/MlGrammarSynthesizer_CaseLookupFunction.hpp> | ||
#include <inflection/grammar/synthesis/MlGrammarSynthesizer_MlDisplayFunction.hpp> | ||
#include <inflection/grammar/synthesis/GrammemeConstants.hpp> | ||
|
||
namespace inflection::grammar::synthesis { | ||
|
||
void MlGrammarSynthesizer::addSemanticFeatures(::inflection::dialog::SemanticFeatureModel& featureModel) | ||
{ | ||
featureModel.putDefaultFeatureFunctionByName(GrammemeConstants::NUMBER, new MlGrammarSynthesizer_NumberLookupFunction()); | ||
featureModel.putDefaultFeatureFunctionByName(GrammemeConstants::GENDER, new MlGrammarSynthesizer_GenderLookupFunction()); | ||
featureModel.putDefaultFeatureFunctionByName(GrammemeConstants::CASE, new MlGrammarSynthesizer_CaseLookupFunction()); | ||
|
||
featureModel.setDefaultDisplayFunction(new MlGrammarSynthesizer_MlDisplayFunction(featureModel)); | ||
} | ||
|
||
} // namespace inflection::grammar::synthesis | ||
|
17 changes: 17 additions & 0 deletions
17
inflection/src/inflection/grammar/synthesis/MlGrammarSynthesizer.hpp
This file contains hidden or 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,17 @@ | ||
/* | ||
* Copyright 2025 Apple Inc. All rights reserved. | ||
*/ | ||
#pragma once | ||
|
||
#include <inflection/dialog/fwd.hpp> | ||
#include <inflection/grammar/synthesis/fwd.hpp> | ||
#include <string> | ||
|
||
class inflection::grammar::synthesis::MlGrammarSynthesizer final | ||
{ | ||
public: | ||
static void addSemanticFeatures(::inflection::dialog::SemanticFeatureModel& featureModel); | ||
private: | ||
MlGrammarSynthesizer() = delete; | ||
}; | ||
|
Oops, something went wrong.
Oops, something went wrong.
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.
The
determination=
is unnecessary. You can remove it.