LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
HyphenWordAlternatives.h
Go to the documentation of this file.
1// Copyright 2002-2020 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
29
30#ifndef LIMA_MORPHOLOGICANALYSIS_HYPHENWORDALTERNATIVES_H
31#define LIMA_MORPHOLOGICANALYSIS_HYPHENWORDALTERNATIVES_H
32
40#include "AlternativesReader.h"
41
42namespace Lima {
43 namespace Common {
44 namespace AnnotationGraphs {
45 class AnnotationData;
46 }
47 }
48namespace LinguisticProcessing {
49namespace MorphologicAnalysis {
50
51#define HYPHENWORDALTERNATIVESFACTORY_CLASSID "HyphenWordAlternatives"
52
54{
55
56public:
59
60 void init(
62 Manager* manager) override
63 ;
64
66 AnalysisContent& analysis) const override;
67
68protected:
69
70private:
71
72 std::shared_ptr<FlatTokenizer::Tokenizer> m_tokenizer;
73 std::shared_ptr<AnalysisDict::AbstractAnalysisDictionary> m_dictionary;
74 std::shared_ptr<FlatTokenizer::CharChart> m_charChart;
75 bool m_deleteHyphenWord;
76 bool m_confidentMode;
77 MediaId m_language;
78 MediaId m_engLanguageId;
79 std::shared_ptr<AlternativesReader> m_reader;
80 std::string m_sentBoundariesName;
81
82 void makeHyphenSplitAlternativeFor(
83 LinguisticGraphVertex splitted,
84 LinguisticGraph* graph,
86 SegmentationData* sb) const;
87
88 bool isWorthSplitting(
89 LinguisticGraphVertex splitted,
90 LinguisticGraph* graph) const;
91
92};
93
94} // closing namespace MorphologicAnalysis
95} // closing namespace LinguisticProcessing
96} // closing namespace Lima
97
98#endif // LIMA_MORPHOLOGICANALYSIS_HYPHENWORDALTERNATIVES_H
LinguisticGraph::vertex_descriptor LinguisticGraphVertex
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, LinguisticVertexProperties > LinguisticGraph
Property to identify the chains in the graph.
#define LIMA_MORPHOLOGICANALYSIS_EXPORT
Holds all data that pass through the ProcessUnits Analysis data are shared pointers,...
Holds an annotation graph and gives an API to manipulate it.
InitializableObjectManager< MediaProcessUnit, MediaProcessUnitInitializationParameters > Manager
void init(Common::XMLConfigurationFiles::GroupConfigurationStructure &unitConfiguration, Manager *manager) override
LimaStatusCode process(AnalysisContent &analysis) const override
Process on data in analysisContent.
NAUTITIA.
LimaStatusCode
Definition LimaCommon.h:236