36namespace LinguisticProcessing
38namespace FlatTokenizer
82 LDEBUG <<
"Tokenizer::init";
89 m_d->
_charChart = std::dynamic_pointer_cast<CharChart>(res);
94 LERROR <<
"no param 'charChart' in Tokenizer group configuration (language="
108 LERROR <<
"no param 'automatonFile' in Tokenizer group configuration (language="
115 std::ostringstream mess;
116 mess <<
"XmlSyntaxException at line "<<exc.
_lineNumber<<
" cause: ";
131 default: mess <<
"??";
137 catch (std::exception &exc)
152 LINFO <<
"start tokenizer process";
157 analysis.
setData(
"AnalysisGraph",anagraph);
164 LINFO <<
"Running automaton on" << *originalText;
168 LTRACE <<
"Running automaton";
174 <<
" for a text of size " << text->
size() ;
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, LinguisticVertexProperties > LinguisticGraph
Property to identify the chains in the graph.
Defines a Factory to create Object of type Base.
#define FLATTOKENIZER_CLASSID
Holds all data that pass through the ProcessUnits Analysis data are shared pointers,...
std::shared_ptr< AnalysisData > getData(const QString &id)
return AnalysisData by id
void setData(const QString &id, std::shared_ptr< AnalysisData > data)
set an analysisData with the given id.
std::string & getParamsValueAtKey(const std::string &key)
return a message when a 'param' was not found
Manage initialization of InitializableObjects using configuration module and parameters.
const InitializationParameters & getInitializationParameters() const
get Initialization Parameters
Use this exception to signal an error in one of the configuration files.
void loadFromFile(const std::string &fileName)
void setCharChart(std::shared_ptr< CharChart > cc)
const State * run(Text &text, const State *state=0) const
void setGraph(LinguisticGraphVertex position, LinguisticGraph *graph)
void finalizeAndUnsetGraph()
void setText(const Lima::LimaString &text)
virtual ~TokenizerPrivate()
std::shared_ptr< CharChart > _charChart
const std::shared_ptr< CharChart > charChart() const
LimaStatusCode process(AnalysisContent &analysis) const override
Process on data in analysisContent.
void init(Common::XMLConfigurationFiles::GroupConfigurationStructure &unitConfiguration, Manager *manager) override
initialize with parameters from configuration file.
void setCharChart(std::shared_ptr< CharChart > charChart)
define the limaStringText resource which is the text in limaString formal
An AnalysisData containing a LinguisticGraph with a language and an id.
const LinguisticGraphVertex & lastVertex(void) const
Returns the last vertex of the graph.
const LinguisticGraph * getGraph(void) const
Returns the underlying graph structure.
const LinguisticGraphVertex & firstVertex(void) const
Returns the first vertex of the graph.
static const LinguisticResources & single()
const singleton accessor
This file contains a class to control log of informations about time, such as logging cumulated time ...
QString findFileInPaths(const QString &paths, const QString &fileName, const QChar &separator)
Find the given file in the given paths.
static SimpleFactory< MediaProcessUnit, Tokenizer > tokenizerFactory(FLATTOKENIZER_CLASSID)
launch exception related to the configuration file parsing