{"id":13740793,"url":"https://github.com/hfst/hfst-ospell","last_synced_at":"2025-05-08T20:32:41.875Z","repository":{"id":49148686,"uuid":"53049269","full_name":"hfst/hfst-ospell","owner":"hfst","description":"HFST spell checker library and command line tool","archived":false,"fork":false,"pushed_at":"2024-02-20T11:03:32.000Z","size":2132,"stargazers_count":13,"open_issues_count":13,"forks_count":9,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-13T12:00:29.583Z","etag":null,"topics":["spellchecker"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hfst.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-03-03T12:39:34.000Z","updated_at":"2024-08-27T07:37:26.000Z","dependencies_parsed_at":"2024-02-20T12:25:25.538Z","dependency_job_id":"398539c8-69f6-430b-b9fe-b568d8d7d522","html_url":"https://github.com/hfst/hfst-ospell","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfst%2Fhfst-ospell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfst%2Fhfst-ospell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfst%2Fhfst-ospell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hfst%2Fhfst-ospell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hfst","download_url":"https://codeload.github.com/hfst/hfst-ospell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253145072,"owners_count":21861184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["spellchecker"],"created_at":"2024-08-03T04:00:52.262Z","updated_at":"2025-05-08T20:32:41.313Z","avatar_url":"https://github.com/hfst.png","language":"C++","funding_links":[],"categories":["Software"],"sub_categories":["Utilities"],"readme":"# Hfst-ospell library and toy commandline tester\n\nThis is a minimal hfst optimized lookup format based spell checker library and\na demonstrational implementation of command line based spell checker. The\nlibrary is licenced under Apache licence version 2, other licences can be\nobtained from University of Helsinki.\n\n[![Build Status](https://travis-ci.org/hfst/hfst-ospell.svg?branch=master)](https://travis-ci.org/hfst/hfst-ospell)\n\n## Dependencies\n\n- libxml++2\n- libarchive\n\n## Debian packages for dependencies\n\n- libxml++2-dev\n- libarchive-dev\n\n## Usage\n\nUsage in external programs:\n\n    #include \u003cospell.h\u003e\n\nand compile your project with:\n\n    $(pkg-config --cflags hfstospell)\n\nand link with:\n\n    $(pkg-config --libs hfstospell)\n\n## Programming examples\n\nThe library lives in a namespace called hfst_ospell. Pass (weighted!) Transducer\npointers to the Speller constructor, eg.:\n\n    FILE * error_source = fopen(error_filename, \"r\");\n    FILE * lexicon_file = fopen(lexicon_filename, \"r\");\n    hfst_ospell::Transducer * error;\n    hfst_ospell::Transducer * lexicon;\n    try {\n        error = new hfst_ospell::Transducer(error_source);\n        lexicon = new hfst_ospell::Transducer(lexicon_file);\n    } catch (hfst_ospell::TransducerParsingException\u0026 e) {\n            /* problem with transducer file, usually completely\n            different type of file - there's no magic number\n            in the header to check for this */\n        }\n    hfst_ospell::Speller * speller;\n    try {\n        speller = new hfst_ospell::Speller(error, lexicon);\n    } catch (hfst_ospell::AlphabetTranslationException\u0026 e) {\n        /* problem with translating between the two alphabets */\n    }\n\n\nAnd use the functions:\n\n    // returns true if line is found in lexicon\n    bool hfst_ospell::Speller::check(char * line);\n\n    // CorrectionQueue is a priority queue, sorted by weight\n    hfst_ospell::CorrectionQueue hfst_ospell::Speller::correct(char * line);\n\n\nto communicate with it. See main.cc for a concrete usage example. \n\n## Command-line tool\n\nMain.cc provides a demo utility with the following help message:\n\n    Usage: hfst-ospell [OPTIONS] ERRORSOURCE LEXICON\n    Run a composition of ERRORSOURCE and LEXICON on standard input and\n    print corrected output\n\n      -h, --help                  Print this help message\n      -V, --version               Print version information\n      -v, --verbose               Be verbose\n      -q, --quiet                 Don't be verbose (default)\n      -s, --silent                Same as quiet\n\n\n    Report bugs to hfst-bugs@ling.helsinki.fi\n\n# Use in real-world applications\n\nThe HFST based spellers can be used in real applications with help of\n[voikko](http://voikko.sf.net). Voikko in turn can be used with enchant,\nlibreoffice, and firefox.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhfst%2Fhfst-ospell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhfst%2Fhfst-ospell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhfst%2Fhfst-ospell/lists"}