LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
CoreferenceEngine.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#ifndef COREFERENCEENGINE_H
7#define COREFERENCEENGINE_H
8
12
13#include <vector>
14#include <string.h>
15
16namespace Lima
17{
19{
20namespace EntityTracking
21{
23{
24public:
25 /* test if the two string are equals */
26 bool isEqual(const QString& a, const QString& b) const;
27 /* return true if the current word is included in the original word */
28 bool isInclude(const QString& original, const QString& currentWord) const;
29 /* return true if the current word is an acronym of the original word */
30 bool isAcronym(const QString& original, const QString& currentWord) const;
31
32 void addNewForm(const QString& original, const QString& currentWord);
33 bool exist(const QString& original) const;
34
35 std::vector<LinguisticAnalysisStructure::Token> searchCoreference(
37
39
40 std::vector<LinguisticAnalysisStructure::Token>& getToken();
41 std::vector<LinguisticAnalysisStructure::Token>& getAnnotations();
42 std::vector< std::vector<QString> >& getAcronym();
45
46private:
47
48 std::vector< std::vector<QString> > m_acronyms; // the vector of acronyms
49 std::vector<LinguisticAnalysisStructure::Token> allTokens; /* all token in the graph */
50 std::vector<LinguisticAnalysisStructure::Token> storedAnnotation;
51
52};
53
54} // SpecificEntities
55} // LinguisticProcessing
56} // Lima
57
58#endif // COREFERENCEENGINE_H
#define LIMA_ENTITYTRACKING_EXPORT
void storeAnnot(const LinguisticAnalysisStructure::Token &token)
std::vector< LinguisticAnalysisStructure::Token > & getAnnotations()
std::vector< LinguisticAnalysisStructure::Token > searchCoreference(const LinguisticAnalysisStructure::Token &tok)
bool isInclude(const QString &original, const QString &currentWord) const
std::vector< LinguisticAnalysisStructure::Token > & getToken()
bool isAcronym(const QString &original, const QString &currentWord) const
void storeSpecificEntity(const SpecificEntities::SpecificEntityAnnotation *se) const
void storeAllToken(const LinguisticAnalysisStructure::Token &token)
bool isEqual(const QString &a, const QString &b) const
void addNewForm(const QString &original, const QString &currentWord)
A representation of a specific entity to store in the annotation graph.
NAUTITIA.