LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
MorphoSyntacticData.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
6/***************************************************************************
7 * Copyright (C) 2004-2012 by CEA LIST *
8 * *
9 ***************************************************************************/
10#ifndef LIMA_LINGUISTICPROCESSING_LINGUISTICANALYSISSTRUCTUREMORPHOSYNTACTICDATA_H
11#define LIMA_LINGUISTICPROCESSING_LINGUISTICANALYSISSTRUCTUREMORPHOSYNTACTICDATA_H
12
14#include "common/LimaCommon.h"
17
18#include "Token.h"
19
20#include <vector>
21#include <list>
22
23namespace Lima {
24
25namespace LinguisticProcessing {
26
28
45
55
60class LIMA_LINGUISTICANALYSISSTRUCTURE_EXPORT MorphoSyntacticData : public std::vector<LinguisticElement> {
61public:
63
64 virtual ~MorphoSyntacticData();
65
72 bool hasUniqueMicro(const Lima::Common::PropertyCode::PropertyAccessor& microAccessor, const std::list< Lima::LinguisticCode >& microFilter);
73
74 uint64_t countValues(const Common::PropertyCode::PropertyAccessor& propertyAccessor);
75
83
84 std::set<LinguisticCode> allValues(const Common::PropertyCode::PropertyAccessor& propertyAccessor) const;
85
86 void allValues(const Common::PropertyCode::PropertyAccessor& propertyAccessor,std::set<LinguisticCode>& result) const;
87
88 std::set<StringsPoolIndex> allInflectedForms() const;
89
90 std::set<StringsPoolIndex> allLemma() const;
91
92 std::set<StringsPoolIndex> allNormalizedForms() const;
93
94 void outputXml(std::ostream& xmlStream,const Common::PropertyCode::PropertyCodeManager& pcm,const FsaStringsPool& sp) const;
95
96};
97
98inline std::set<LinguisticCode> MorphoSyntacticData::allValues(const Common::PropertyCode::PropertyAccessor& propertyAccessor) const
99{
100 std::set<LinguisticCode> res;
101 allValues(propertyAccessor,res);
102 return res;
103}
104
105}
106
107}
108
109}
110
111#endif
#define LIMA_LINGUISTICANALYSISSTRUCTURE_EXPORT
Provide function to read write and check a property.
Provide tools to parse a property file, and deal with the property coding system.
uint64_t countValues(const Common::PropertyCode::PropertyAccessor &propertyAccessor)
void outputXml(std::ostream &xmlStream, const Common::PropertyCode::PropertyCodeManager &pcm, const FsaStringsPool &sp) const
LinguisticCode firstValue(const Common::PropertyCode::PropertyAccessor &propertyAccessor) const
Return the first non empty value for the given accessor.
bool hasUniqueMicro(const Lima::Common::PropertyCode::PropertyAccessor &microAccessor, const std::list< Lima::LinguisticCode > &microFilter)
return true if there is only one micro, and this micro is in microfilter
std::set< LinguisticCode > allValues(const Common::PropertyCode::PropertyAccessor &propertyAccessor) const
NAUTITIA.
static bool operator<(const QStringView &entityStr, const TextHtmlEntity &entity)