LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
AbbreviationSplitAlternatives.h
Go to the documentation of this file.
1// Copyright 2002-2013 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
30#ifndef LIMA_MORPHOLOGICANALYSIS_HYPHENWORDALTERNATIVES_H
31#define LIMA_MORPHOLOGICANALYSIS_HYPHENWORDALTERNATIVES_H
32
38#include "AlternativesReader.h"
39
40#include <QRegularExpression>
41
42namespace Lima {
43 namespace Common {
44 namespace AnnotationGraphs {
45 class AnnotationData;
46 }
47 }
48 namespace LinguisticProcessing {
49namespace MorphologicAnalysis {
50
51#define ABBREVIATIONSPLITALTERNATIVESFACTORY_CLASSID "AbbreviationSplitAlternatives"
52
54{
55
56public:
59
60 void init(
62 Manager* manager) override
63 ;
64
65 LimaStatusCode process(
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::vector<LimaString> m_abbreviations;
75 MediaId m_language;
76 bool m_confidentMode;
77 std::shared_ptr<AlternativesReader> m_reader;
78 QRegularExpression m_charSplitRegexp;
79
80 bool makeConcatenatedAbbreviationSplitAlternativeFor(
81 LinguisticGraphVertex splitted,
82 LinguisticGraph* graph,
83 Common::AnnotationGraphs::AnnotationData* annotationData) const;
84
85 bool makePossessiveAlternativeFor(
86 LinguisticGraphVertex splitted,
87 LinguisticGraph* graph,
88 Common::AnnotationGraphs::AnnotationData* annotationData) const;
89};
90
91} // closing namespace MorphologicAnalysis
92} // closing namespace LinguisticProcessing
93} // closing namespace Lima
94
95#endif // LIMA_MORPHOLOGICANALYSIS_HYPHENWORDALTERNATIVES_H
A graph structure for linguistic analysis.
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.
Manage initialization of InitializableObjects using configuration module and parameters.
NAUTITIA.
LimaStatusCode
Definition LimaCommon.h:236