#include <concordia_searcher.hpp>
|
virtual | ~ConcordiaSearcher () |
|
void | concordiaSearch (boost::shared_ptr< ConcordiaSearchResult > result, boost::shared_ptr< std::vector< sauchar_t > > T, boost::shared_ptr< std::vector< SUFFIX_MARKER_TYPE > > markers, boost::shared_ptr< std::vector< saidx_t > > SA, const std::vector< INDEX_CHARACTER_TYPE > &pattern) throw (ConcordiaException) |
|
std::vector< AnubisSearchResult > | anubisSearch (boost::shared_ptr< ConcordiaConfig > config, boost::shared_ptr< std::vector< sauchar_t > > T, boost::shared_ptr< std::vector< SUFFIX_MARKER_TYPE > > markers, boost::shared_ptr< std::vector< saidx_t > > SA, const std::vector< INDEX_CHARACTER_TYPE > &pattern) throw (ConcordiaException) |
|
boost::shared_ptr< TmMatchesMap > | getTmMatches (boost::shared_ptr< std::vector< sauchar_t > > T, boost::shared_ptr< std::vector< SUFFIX_MARKER_TYPE > > markers, boost::shared_ptr< std::vector< saidx_t > > SA, const std::vector< INDEX_CHARACTER_TYPE > &pattern) throw (ConcordiaException) |
|
std::vector< SubstringOccurence > | lcpSearch (boost::shared_ptr< std::vector< sauchar_t > > T, boost::shared_ptr< std::vector< SUFFIX_MARKER_TYPE > > markers, boost::shared_ptr< std::vector< saidx_t > > SA, const std::vector< sauchar_t > &pattern, SUFFIX_MARKER_TYPE &length) throw (ConcordiaException) |
|
Class for searching using Concordia algorithm. All searches are performed on data structures passed to the methods of this class by smart pointers.
ConcordiaSearcher::~ConcordiaSearcher |
( |
| ) |
|
|
virtual |
std::vector< AnubisSearchResult > ConcordiaSearcher::anubisSearch |
( |
boost::shared_ptr< ConcordiaConfig > |
config, |
|
|
boost::shared_ptr< std::vector< sauchar_t > > |
T, |
|
|
boost::shared_ptr< std::vector< SUFFIX_MARKER_TYPE > > |
markers, |
|
|
boost::shared_ptr< std::vector< saidx_t > > |
SA, |
|
|
const std::vector< INDEX_CHARACTER_TYPE > & |
pattern |
|
) |
| |
throw | ( | ConcordiaException |
| ) | | |
- Deprecated:
- Finds the examples from the index, whose resemblance to the pattern is maximal. This method may perform very slow, try using concordiaSearch instead.
- Parameters
-
config | concordia config object (to read the anubis threshold parameter) |
T | hashed index to search in |
markers | markers array for the needs of searching |
SA | suffix array for the needs of searching |
pattern | pattern to be searched in the index. This pattern needs to be hashed. |
- Returns
- vector of results
- Exceptions
-
void ConcordiaSearcher::concordiaSearch |
( |
boost::shared_ptr< ConcordiaSearchResult > |
result, |
|
|
boost::shared_ptr< std::vector< sauchar_t > > |
T, |
|
|
boost::shared_ptr< std::vector< SUFFIX_MARKER_TYPE > > |
markers, |
|
|
boost::shared_ptr< std::vector< saidx_t > > |
SA, |
|
|
const std::vector< INDEX_CHARACTER_TYPE > & |
pattern |
|
) |
| |
throw | ( | ConcordiaException |
| ) | | |
Performs concordia lookup on the RAM-based index. This is a unique library functionality, designed to facilitate Computer-Aided Translation. For more info see Concordia searching.
- Parameters
-
result | variable to store the result |
T | hashed index to search in |
markers | markers array for the needs of searching |
SA | suffix array for the needs of searching |
pattern | pattern to be searched in the index. This pattern needs to be hashed. |
- Exceptions
-
boost::shared_ptr< TmMatchesMap > ConcordiaSearcher::getTmMatches |
( |
boost::shared_ptr< std::vector< sauchar_t > > |
T, |
|
|
boost::shared_ptr< std::vector< SUFFIX_MARKER_TYPE > > |
markers, |
|
|
boost::shared_ptr< std::vector< saidx_t > > |
SA, |
|
|
const std::vector< INDEX_CHARACTER_TYPE > & |
pattern |
|
) |
| |
throw | ( | ConcordiaException |
| ) | | |
Generates map of all examples in the index which have at least one word in common with the pattern. This method is internally used in anubisSearch and may perform slow.
- Parameters
-
T | hashed index to search in |
markers | markers array for the needs of searching |
SA | suffix array for the needs of searching |
pattern | pattern to be searched in the index. This pattern needs to be hashed. |
- Returns
- generated map
- Exceptions
-
std::vector< SubstringOccurence > ConcordiaSearcher::lcpSearch |
( |
boost::shared_ptr< std::vector< sauchar_t > > |
T, |
|
|
boost::shared_ptr< std::vector< SUFFIX_MARKER_TYPE > > |
markers, |
|
|
boost::shared_ptr< std::vector< saidx_t > > |
SA, |
|
|
const std::vector< sauchar_t > & |
pattern, |
|
|
SUFFIX_MARKER_TYPE & |
length |
|
) |
| |
throw | ( | ConcordiaException |
| ) | | |
Looks for fragments in the index which have the longest common prefix with the pattern. This method return the list of locations of these longest fragments (as return value) and their length in the length parameter. There is a tight limit on the number of longest fragments (currently set to 3). This method is used in conordiaSearch.
- Parameters
-
T | hashed index to search in |
markers | markers array for the needs of searching |
SA | suffix array for the needs of searching |
pattern | pattern to be searched in the index. This pattern needs to be hashed. |
length | the returned length of the longest fragments |
- Returns
- list of locations of the longest fragments
- Exceptions
-
The documentation for this class was generated from the following files:
- /home/rafalj/projects/concordia/concordia/concordia/concordia_searcher.hpp
- /home/rafalj/projects/concordia/concordia/concordia/concordia_searcher.cpp