FreeLing
3.1
|
#include <foma_FSM.h>
Public Member Functions | |
foma_FSM (const std::wstring &, const std::wstring &mcost=L"") | |
build automaton from text file | |
~foma_FSM () | |
clear | |
void | get_similar_words (const std::wstring &, std::list< std::pair< std::wstring, int > > &) const |
Use automata to obtain closest matches to given form, and add them to given list. | |
void | set_cutoff_threshold (int) |
set maximum edit distance of desired results | |
void | set_num_matches (int) |
set maximum number of desired results | |
void | set_basic_operation_cost (int) |
Set cost for basic SED operations. | |
Private Attributes | |
struct fsm * | fsa |
foma automaton | |
struct apply_med_handle * | h_fsa |
Handle for foma minimum edit distance automaton. |
freeling::foma_FSM::foma_FSM | ( | const std::wstring & | , |
const std::wstring & | mcost = L"" |
||
) |
build automaton from text file
Create foma FSM from given text file.
References ERROR_CRASH, set2wstring, TRACE, WARNING, and wstring2string.
clear
Destructor, free foma structs.
void freeling::foma_FSM::get_similar_words | ( | const std::wstring & | , |
std::list< std::pair< std::wstring, int > > & | |||
) | const |
Use automata to obtain closest matches to given form, and add them to given list.
Use automata to obtain closest matches to given form, adding them (and the distance) to given list.
References string2wstring, TRACE, and wstring2string.
Referenced by freeling::alternatives::analyze(), and freeling::alternatives::get_similar_words().
void freeling::foma_FSM::set_basic_operation_cost | ( | int | cost | ) |
Set cost for basic SED operations.
Set cost for basic SED operations to given value.
void freeling::foma_FSM::set_cutoff_threshold | ( | int | thr | ) |
set maximum edit distance of desired results
Set maximum edit distance to retrieve.
Referenced by freeling::alternatives::alternatives().
void freeling::foma_FSM::set_num_matches | ( | int | max | ) |
set maximum number of desired results
Set maximum number of matches to retrieve.
struct fsm* freeling::foma_FSM::fsa [private] |
foma automaton
struct apply_med_handle* freeling::foma_FSM::h_fsa [private] |
Handle for foma minimum edit distance automaton.