LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
bowComplexTokenPrivate.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
6/************************************************************************
7 * @file bowComplexToken.cpp
8 * @author Besancon Romaric
9 * @date Tue Oct 7 2003
10 * copyright Copyright (C) 2003 by CEA LIST
11 *
12 ***********************************************************************/
13
14#ifndef BOWCOMPLEXTOKENPRIVATE_H
15#define BOWCOMPLEXTOKENPRIVATE_H
16
17
18#include "bowTokenPrivate.h"
19#include "bowComplexToken.h"
20// #include "BoWRelation.h"
21// #include "common/Data/readwritetools.h"
22// #include "common/Data/strwstrtools.h"
23// #include <iostream>
24// #include <fstream>
25// #include <sstream>
26// #include <stdexcept>
27// #include <boost/graph/graph_concepts.hpp>
28
29namespace Lima {
30namespace Common {
31namespace BagOfWords {
32
34{
35 friend class BoWComplexToken;
36public:
47
49 const LinguisticCode category,
50 const uint64_t position,
51 const uint64_t length);
52
68 const LinguisticCode category,
69 const uint64_t position,
70 const uint64_t length,
71 std::deque< boost::shared_ptr< BoWToken > >& parts,
72 const uint64_t head);
73
75
78
79 std::deque<BoWComplexToken::Part> m_parts;
81 uint64_t m_head;
84 boost::shared_ptr< BoWToken > addPart(boost::shared_ptr< BoWRelation > rel,
85 boost::shared_ptr< BoWToken > tok,
86 const bool isHead=false);
87
88 //helper functions for constructors, destructor and assignment operator
89 void copy(const BoWComplexToken& a);
90
91};
92
93} // namespace BagOfWords
94} // namespace Common
95} // namespace Lima
96
97#endif
BoWComplexTokenPrivate & operator=(const BoWComplexTokenPrivate &)
boost::shared_ptr< BoWToken > addPart(boost::shared_ptr< BoWRelation > rel, boost::shared_ptr< BoWToken > tok, const bool isHead=false)
BoWComplexTokenPrivate(const Lima::LimaString &lemma, const LinguisticCode category, const uint64_t position, const uint64_t length, std::deque< boost::shared_ptr< BoWToken > > &parts, const uint64_t head)
a constructor to build a simple, independent complex token (parts are simple tokens,...
std::deque< BoWComplexToken::Part > m_parts
the list of the parts of the complex token
BoWComplexTokenPrivate(const Lima::LimaString &lemma, const LinguisticCode category, const uint64_t position, const uint64_t length)
uint64_t m_head
the index of the head of the complex token in its part list
This is a complex token for an index.
NAUTITIA.
QString LimaString
Definition LimaString.h:33