Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.6%) to scientific vocabulary
Keywords
Repository
HFST spell checker library and command line tool
Basic Info
Statistics
- Stars: 14
- Watchers: 8
- Forks: 9
- Open Issues: 13
- Releases: 10
Topics
Metadata Files
README.md
Hfst-ospell library and toy commandline tester
This is a minimal hfst optimized lookup format based spell checker library and a demonstrational implementation of command line based spell checker. The library is licenced under Apache licence version 2, other licences can be obtained from University of Helsinki.
Dependencies
- libxml++2
- libarchive
Debian packages for dependencies
- libxml++2-dev
- libarchive-dev
Usage
Usage in external programs:
#include <ospell.h>
and compile your project with:
$(pkg-config --cflags hfstospell)
and link with:
$(pkg-config --libs hfstospell)
Programming examples
The library lives in a namespace called hfst_ospell. Pass (weighted!) Transducer pointers to the Speller constructor, eg.:
FILE * error_source = fopen(error_filename, "r");
FILE * lexicon_file = fopen(lexicon_filename, "r");
hfst_ospell::Transducer * error;
hfst_ospell::Transducer * lexicon;
try {
error = new hfst_ospell::Transducer(error_source);
lexicon = new hfst_ospell::Transducer(lexicon_file);
} catch (hfst_ospell::TransducerParsingException& e) {
/* problem with transducer file, usually completely
different type of file - there's no magic number
in the header to check for this */
}
hfst_ospell::Speller * speller;
try {
speller = new hfst_ospell::Speller(error, lexicon);
} catch (hfst_ospell::AlphabetTranslationException& e) {
/* problem with translating between the two alphabets */
}
And use the functions:
// returns true if line is found in lexicon
bool hfst_ospell::Speller::check(char * line);
// CorrectionQueue is a priority queue, sorted by weight
hfst_ospell::CorrectionQueue hfst_ospell::Speller::correct(char * line);
to communicate with it. See main.cc for a concrete usage example.
Command-line tool
Main.cc provides a demo utility with the following help message:
Usage: hfst-ospell [OPTIONS] ERRORSOURCE LEXICON
Run a composition of ERRORSOURCE and LEXICON on standard input and
print corrected output
-h, --help Print this help message
-V, --version Print version information
-v, --verbose Be verbose
-q, --quiet Don't be verbose (default)
-s, --silent Same as quiet
Report bugs to hfst-bugs@ling.helsinki.fi
Use in real-world applications
The HFST based spellers can be used in real applications with help of voikko. Voikko in turn can be used with enchant, libreoffice, and firefox.
Owner
- Name: Helsinki Finite-State Technology
- Login: hfst
- Kind: organization
- Email: hfst-bugs@helsinki.fi
- Location: Helsinki
- Website: http://hfst.github.io
- Repositories: 3
- Profile: https://github.com/hfst
Helsinki Finite-State Technology
Citation (CITATION.cff)
authors:
- family-names: Pirinen
given-names: Flammie A
orcid: "https://orcid.org/0000-0003-1207-5395"
- family-names: Hardwick
given-names: Sam
cff-version: 1.2.0
date-released: "2022-03-13"
keywords:
- spell-checking
- nlp
message: If you use this software, please cite it using these metadata.
repository-code: "https://github.com/hfst/hfst-ospell"
title: HFST ospell
version: 0.5.3
preferred-citation:
authors:
- family-names: Pirinen
given-names: Flammie A
- family-names: Hardwick
given-names: Sam
- family-names: Lindén
given-names: Krister
title: "Effect of language and error models on efficiency of finite-state spell-checking and correction"
type: article
license: GPL-3.0
GitHub Events
Total
- Watch event: 1
Last Year
- Watch event: 1
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 10
proxy.golang.org: github.com/hfst/hfst-ospell
- Documentation: https://pkg.go.dev/github.com/hfst/hfst-ospell#section-documentation
- License: apache-2.0
-
Latest release: v0.5.4
published about 2 years ago