LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
integerCost.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 LIMA_POSTAGGER_INTEGERCOST_H
7
#define LIMA_POSTAGGER_INTEGERCOST_H
8
9
#include "
PosTaggerExport.h
"
10
#include <iostream>
11
#include <limits>
12
#include <
common/LimaCommon.h
>
13
14
namespace
Lima
15
{
16
namespace
LinguisticProcessing
17
{
18
namespace
PosTagger
19
{
20
21
class
LIMA_POSTAGGER_EXPORT
IntegerCost
22
{
23
24
friend
LIMA_POSTAGGER_EXPORT
std::ostream&
operator<<
(std::ostream& out,
const
IntegerCost
& cost);
25
26
public
:
27
IntegerCost
();
28
29
IntegerCost
(uint64_t cost);
30
31
// IntegerCost(const IntegerCost& fc);
32
33
virtual
~IntegerCost
();
34
35
bool
operator<
(
const
IntegerCost
& fc)
const
;
36
bool
operator==(
const
IntegerCost
& fc)
const
;
37
IntegerCost
operator+(
const
IntegerCost
& fc)
const
;
38
IntegerCost
& operator+=(
const
IntegerCost
& fc);
39
40
inline
bool
operator!=
(
const
IntegerCost
& fc)
const
{
return
!(operator==(fc));}
41
42
private
:
43
44
uint64_t m_cost;
45
};
46
47
#ifdef WIN32
48
#undef max
49
#endif
50
51
class
LIMA_POSTAGGER_EXPORT
IntegerCostFunction
52
{
53
public
:
54
55
IntegerCostFunction
();
56
57
IntegerCostFunction
(
58
const
IntegerCostFunction
& cf);
59
60
virtual
~IntegerCostFunction
();
61
62
IntegerCost
operator()(
LinguisticCode
cat1,
LinguisticCode
cat2,
LinguisticCode
cat3)
const
;
63
64
inline
IntegerCost
getMinimumCost
()
const
{
return
0; }
65
66
inline
IntegerCost
getMaximumCost
()
const
{
return
std::numeric_limits<uint64_t>::max(); }
67
68
private
:
69
70
71
};
72
73
}
// PosTagger
74
}
// LinguisticProcessing
75
}
// Lima
76
77
#endif
LimaCommon.h
operator<<
QDebug & operator<<(QDebug &qd, const std::string &str)
Definition
QsLog.cpp:39
PosTaggerExport.h
LIMA_POSTAGGER_EXPORT
#define LIMA_POSTAGGER_EXPORT
Definition
PosTaggerExport.h:30
Lima::LinguisticCode
Definition
StdBitset.h:23
Lima::LinguisticProcessing::PosTagger::IntegerCostFunction
Definition
integerCost.h:52
Lima::LinguisticProcessing::PosTagger::IntegerCostFunction::getMaximumCost
IntegerCost getMaximumCost() const
Definition
integerCost.h:66
Lima::LinguisticProcessing::PosTagger::IntegerCostFunction::getMinimumCost
IntegerCost getMinimumCost() const
Definition
integerCost.h:64
Lima::LinguisticProcessing::PosTagger::IntegerCost
Definition
integerCost.h:22
Lima::LinguisticProcessing::PosTagger::IntegerCost::operator!=
bool operator!=(const IntegerCost &fc) const
Definition
integerCost.h:40
Lima
NAUTITIA.
Definition
AmosePluginsManager.h:15
operator<
static bool operator<(const QStringView &entityStr, const TextHtmlEntity &entity)
Definition
qtSgmlEntities.cpp:307
lima_linguisticprocessing
src
linguisticProcessing
core
PosTagger
integerCost.h
Generated by
1.9.8