{"id":39406642,"url":"https://github.com/starlangsoftware/turkishmorphologicaldisambiguation-cy","last_synced_at":"2026-01-20T17:00:59.896Z","repository":{"id":57446369,"uuid":"302735423","full_name":"StarlangSoftware/TurkishMorphologicalDisambiguation-Cy","owner":"StarlangSoftware","description":"Turkish Morphological Disambiguation Library","archived":false,"fork":false,"pushed_at":"2025-08-27T12:05:24.000Z","size":3736,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-18T13:56:54.982Z","etag":null,"topics":["morphological-disambiguator","turkish"],"latest_commit_sha":null,"homepage":"","language":"Cython","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StarlangSoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-10-09T19:28:48.000Z","updated_at":"2025-08-27T12:05:28.000Z","dependencies_parsed_at":"2025-08-27T14:11:22.887Z","dependency_job_id":"0ec8fd40-c933-4cdc-afaa-61d0d3878f54","html_url":"https://github.com/StarlangSoftware/TurkishMorphologicalDisambiguation-Cy","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":0.4838709677419355,"last_synced_commit":"20b906509f6806996ee2a0d8eb350d65cd98735b"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/StarlangSoftware/TurkishMorphologicalDisambiguation-Cy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarlangSoftware%2FTurkishMorphologicalDisambiguation-Cy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarlangSoftware%2FTurkishMorphologicalDisambiguation-Cy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarlangSoftware%2FTurkishMorphologicalDisambiguation-Cy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarlangSoftware%2FTurkishMorphologicalDisambiguation-Cy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StarlangSoftware","download_url":"https://codeload.github.com/StarlangSoftware/TurkishMorphologicalDisambiguation-Cy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarlangSoftware%2FTurkishMorphologicalDisambiguation-Cy/sbom","scorecard":{"id":133800,"data":{"date":"2025-08-11","repo":{"name":"github.com/StarlangSoftware/TurkishMorphologicalDisambiguation-Cy","commit":"f166ef1ebb6a775344b57ca02a9b3935c27d4bce"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}}]},"last_synced_at":"2025-08-16T05:51:42.812Z","repository_id":57446369,"created_at":"2025-08-16T05:51:42.812Z","updated_at":"2025-08-16T05:51:42.812Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["morphological-disambiguator","turkish"],"created_at":"2026-01-18T03:31:57.692Z","updated_at":"2026-01-20T17:00:59.862Z","avatar_url":"https://github.com/StarlangSoftware.png","language":"Cython","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Morphological Disambiguation\n\n## Task Definition\n\nMorphological disambiguation is the problem of selecting accurate morphological parse of a word given its possible parses. These parses are generated by a morphological analyzer. In morphologically rich languages like Turkish, the number of possible parses for a given word is generally more than one. Each parse is considered as a different interpretation of a single word. Each interpretation consists of a root word and sequence of inflectional and derivational suffixes. The following table illustrates different interpretations of the word ‘‘üzerine’’.\n\nüzer+Noun+A3sg+P3sg+Dat  \nüzer+Noun+A3sg+P2sg+Dat  \nüz+Verb+Pos+Aor+^DB+Adj+Zero+^DB+Noun+Zero+A3sg+P3sg+Dat  \nüz+Verb+Pos+Aor+^DB+Adj+Zero+^DB+Noun+Zero+A3sg+P2sg+Dat\n\nAs seen above, the first two parses share the same root but different suffix sequences. Similarly, the last two parses also share the same root, however sequence of morphemes are different. Given a parse such as\n\nüz+Verb+Pos+Aor+^DB+Adj+Zero+^DB+Noun+Zero+A3sg+P3sg+Dat\n\neach item is separated by ‘‘+’’ is a morphological feature such as Pos or Aor. Inflectional groups are identified as sequence of morphological features separated by derivational boundaries ^DB. The sequence of inflectional groups forms the term tag. Root word plus tag is named as word form.  So, a word form is defined as follows:\n\nIGroot+IG\u003csub\u003e1\u003c/sub\u003e+^DB+IG\u003csub\u003e2\u003c/sub\u003e+^DB+...+^DB+IG\u003csub\u003en\u003c/sub\u003e\n\nThen the morphological disambiguation problem can be defined as follows: For a given sentence represented by a sequence of words W = w\u003csub\u003e1\u003c/sub\u003e\u003csup\u003en\u003c/sup\u003e = w\u003csub\u003e1\u003c/sub\u003e, w\u003csub\u003e2\u003c/sub\u003e, ..., w\u003csub\u003en\u003c/sub\u003e, determine the sequence of parses T = t\u003csub\u003e1\u003c/sub\u003e\u003csup\u003en\u003c/sup\u003e = t\u003csub\u003e1\u003c/sub\u003e, t\u003csub\u003e2\u003c/sub\u003e, ..., t\u003csub\u003en\u003c/sub\u003e; where t\u003csub\u003ei\u003c/sub\u003e represents the correct parse of the word w\u003csub\u003ei\u003c/sub\u003e.\n\n## Data Annotation\n\n### Preparation\n\n1. Collect a set of sentences to annotate. \n2. Each sentence in the collection must be named as xxxx.yyyyy in increasing order. For example, the first sentence to be annotated will be 0001.train, the second 0002.train, etc.\n3. Put the sentences in the same folder such as *Turkish-Phrase*.\n4. Build the [Java](https://github.com/starlangsoftware/TurkishMorphologicalDisambiguation) project and put the generated sentence-morphological-analyzer.jar file into another folder such as *Program*.\n5. Put *Turkish-Phrase* and *Program* folders into a parent folder.\n\n### Annotation\n\n1. Open sentence-morphological-analyzer.jar file.\n2. Wait until the data load message is displayed.\n3. Click Open button in the Project menu.\n4. Choose a file for annotation from the folder *Turkish-Phrase*.  \n5. For each word in the sentence, click the word, and choose correct morphological analysis for that word.\n6. Click one of the next buttons to go to other files.\n\n## Classification DataSet Generation\n\nAfter annotating sentences, you can use [DataGenerator](https://github.com/starlangsoftware/DataGenerator-Cy) package to generate classification dataset for the Morphological Disambiguation task.\n\n## Generation of ML Models\n\nAfter generating the classification dataset as above, one can use the [Classification](https://github.com/starlangsoftware/Classification-Cy) package to generate machine learning models for the Morphological Disambiguation task.\n\nVideo Lectures\n============\n\n[\u003cimg src=https://github.com/StarlangSoftware/TurkishMorphologicalDisambiguation/blob/master/video1.jpg width=\"50%\"\u003e](https://youtu.be/vhp6Mse1vdM)[\u003cimg src=https://github.com/StarlangSoftware/TurkishMorphologicalDisambiguation/blob/master/video2.jpg width=\"50%\"\u003e](https://youtu.be/lkFhIKdDSvw)[\u003cimg src=https://github.com/StarlangSoftware/TurkishMorphologicalDisambiguation/blob/master/video3.jpg width=\"50%\"\u003e](https://youtu.be/ajXkhb8Hg3c)\n\nFor Developers\n============\n\nYou can also see [Python](https://github.com/starlangsoftware/TurkishMorphologicalDisambiguation-Py), [Java](https://github.com/starlangsoftware/TurkishMorphologicalDisambiguation), [C++](https://github.com/starlangsoftware/TurkishMorphologicalDisambiguation-CPP), [C](https://github.com/starlangsoftware/TurkishMorphologicalDisambiguation-C), [Js](https://github.com/starlangsoftware/TurkishMorphologicalDisambiguation-Js), [Swift](https://github.com/starlangsoftware/TurkishMorphologicalDisambiguation-Swift), or [C#](https://github.com/starlangsoftware/TurkishMorphologicalDisambiguation-CS) repository.\n\n## Requirements\n\n* [Python 3.7 or higher](#python)\n* [Git](#git)\n\n### Python \n\nTo check if you have a compatible version of Python installed, use the following command:\n\n    python -V\n    \nYou can find the latest version of Python [here](https://www.python.org/downloads/).\n\n### Git\n\nInstall the [latest version of Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).\n\n## Pip Install\n\n\tpip3 install NlpToolkit-MorphologicalDisambiguation-Cy\n\n## Download Code\n\nIn order to work on code, create a fork from GitHub page. \nUse Git for cloning the code to your local or below line for Ubuntu:\n\n\tgit clone \u003cyour-fork-git-link\u003e\n\nA directory called MorphologicalDisambiguation will be created. Or you can use below link for exploring the code:\n\n\tgit clone https://github.com/starlangsoftware/TurkishMorphologicalDisambiguation-Cy.git\n\n## Open project with Pycharm IDE\n\nSteps for opening the cloned project:\n\n* Start IDE\n* Select **File | Open** from main menu\n* Choose `DataStructure-CY` file\n* Select open as project option\n* Couple of seconds, project will be downloaded. \n\nFor Developers\n============\n\n+ [Creating MorphologicalDisambiguator](#creating-morphologicaldisambiguator)\n+ [Training MorphologicalDisambiguator](#training-morphologicaldisambiguator)\n+ [Sentence Disambiguation](#sentence-disambiguation)\n\n## Creating MorphologicalDisambiguator \n\nMorphologicalDisambiguator provides Turkish morphological disambiguation. There are possible disambiguation techniques. Depending on the technique used, disambiguator can be instantiated as follows:\n\n* Using `RootFirstDisambiguation`, the one that chooses only the root amongst the given analyses\n\n        morphologicalDisambiguator = RootFirstDisambiguation()\n\n* Using `RootWordStatisticsDisambiguation`, the one that chooses the root that is the most frequently used amongst the given analyses\n\n        morphologicalDisambiguator = RootWordStatisticsDisambiguation()\n\n* Using `LongestRootFirstDisambiguation`, the one that chooses the longest root among the given roots\n        \n        morphologicalDisambiguator = LongestRootFirstDisambiguation()\n\n* Using `HmmDisambiguation`, the one that chooses using an Hmm-based algorithm\n        \n        morphologicalDisambiguator = HmmDisambiguation()\n\n* Using `DummyDisambiguation`, the one that chooses a random one amongst the given analyses \n     \n        morphologicalDisambiguator = DummyDisambiguation()\n    \n\n## Training MorphologicalDisambiguator\n\nTo train the disambiguator, an instance of `DisambiguationCorpus` object is needed. This can be instantiated and the disambiguator can be trained and saved as follows:\n\n    corpus = DisambiguationCorpus(\"penn_treebank.txt\")\n    morphologicalDisambiguator.train(corpus)\n    morphologicalDisambiguator.saveModel()\n    \n      \n## Sentence Disambiguation\n\nTo disambiguate a sentence, a `FsmMorphologicalAnalyzer` instance is required. This can be created as below, further information can be found [here](https://github.com/starlangsoftware/MorphologicalAnalysis/blob/master/README.md#creating-fsmmorphologicalanalyzer).\n\n    fsm = FsmMorphologicalAnalyzer()\n    \nA sentence can be disambiguated as follows: \n    \n    sentence = Sentence(\"Yarın doktora gidecekler\")\n    fsmParseList = fsm.robustMorphologicalAnalysis(sentence)\n    print(\"All parses\\n\")\n    print(\"--------------------------\\n\")\n    for i in range(len(fsmParseList)):\n        print(fsmParseList[i])\n    candidateParses = morphologicalDisambiguator.disambiguate(fsmParseList)\n    print(\"Parses after disambiguation\\n\")\n    print(\"--------------------------\"\\n)\n    for i in range(candidateParses.size()):\n        print(candidateParses.get(i) + \"\\n\")\n\nOutput\n\n    \n    All parses\n    --------------------------\n    yar+NOUN+A3SG+P2SG+NOM\n    yar+NOUN+A3SG+PNON+GEN\n    yar+VERB+POS+IMP+A2PL\n    yarı+NOUN+A3SG+P2SG+NOM\n    yarın+NOUN+A3SG+PNON+NOM\n    \n    doktor+NOUN+A3SG+PNON+DAT\n    doktora+NOUN+A3SG+PNON+NOM\n    \n    git+VERB+POS+FUT+A3PL\n    git+VERB+POS^DB+NOUN+FUTPART+A3PL+PNON+NOM\n    \n    Parses after disambiguation\n    --------------------------\n    yarın+NOUN+A3SG+PNON+NOM\n    doktor+NOUN+A3SG+PNON+DAT\n    git+VERB+POS+FUT+A3PL\n\n# Cite\n\n\t@InProceedings{gorgunyildiz12,\n\tauthor=\"G{\\\"o}rg{\\\"u}n, Onur\n\tand Yildiz, Olcay Taner\",\n\teditor=\"Gelenbe, Erol\n\tand Lent, Ricardo\n\tand Sakellari, Georgia\",\n\ttitle=\"A Novel Approach to Morphological Disambiguation for Turkish\",\n\tbooktitle=\"Computer and Information Sciences II\",\n\tyear=\"2012\",\n\tpublisher=\"Springer London\",\n\taddress=\"London\",\n\tpages=\"77--83\",\n\tisbn=\"978-1-4471-2155-8\"\n\t}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarlangsoftware%2Fturkishmorphologicaldisambiguation-cy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstarlangsoftware%2Fturkishmorphologicaldisambiguation-cy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarlangsoftware%2Fturkishmorphologicaldisambiguation-cy/lists"}