LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
Lima::LinguisticProcessing::Automaton Namespace Reference

Classes

class  AbstractConstraintFunctionFactory
 
class  AgreementConstraint
 generic agreement constraint function: complement must contain the element on which the agreement must stand: GENDER,NUMBER or PERSON More...
 
class  AndTransition
 
class  Automaton
 ␈rief A class for the description of automata More...
 
class  AutomatonControlParams
 ␈rief a class for control parameters for the search using the automata More...
 
class  AutomatonReader
 
class  AutomatonWriter
 
class  BackwardSearch
 
class  CheckIfEmptyPredicate
 
class  CompareRulePtr
 
class  Constraint
 
class  ConstraintCheckListElement
 
class  ConstraintFunction
 
class  ConstraintFunctionFactory
 
class  ConstraintFunctionManager
 
class  DeaccentuatedTransition
 
class  EntityFeature
 a generic feature that is defined by a name and a value, which can be of any type (use boost::any type) More...
 
class  EntityFeatures
 a list of generic features: each feature is unique (only one feature for a name) More...
 
class  EntityGroupTransition
 
class  EntityProperties
 
class  EntityTransition
 
class  EpsilonTransition
 
class  ForwardSearch
 
class  GazeteerTransition
 
class  GenderAgreement
 
class  LemmaTransition
 
class  LengthInInterval
 test the length of the inflected form of the word More...
 
class  LinguisticPropertyIs
 test the value of a linguistic property More...
 
class  MatchElement
 
class  NoSpaceWith
 
class  NumberAgreement
 
class  NumericTransition
 
class  NumericValueInInterval
 test the length of the inflected form of the word More...
 
class  OpenFileException
 
class  PosTransition
 
class  Recognizer
 ␈rief a class for the definition of a complete recognizer More...
 
class  RecognizerMatch
 
class  Rule
 
class  SearchGraph
 
class  SetTransition
 
class  StarTransition
 
class  Transition
 
class  TransitionSearchStructure
 
class  TransitionUnit
 
class  TStatusTransition
 
class  UnknownTypeException
 
class  WordTransition
 

Typedefs

typedef std::pair< std::deque< LinguisticGraphVertex >, const Transition * > DFFSPos
 
typedef uint64_t Tstate
 
typedef StringsPoolIndex Tword
 
typedef LinguisticCode Tpos
 
typedef std::vector< ConstraintCheckListElement > ConstraintCheckList
 
typedef std::vector< Rule * > SetOfRules
 the SetOfRules type is defined as a vector of pointers on Rule
 

Enumerations

enum  ConstraintAction {
  NONE , STORE , COMPARE , PUSH ,
  COMPARE_STACK , TEST , COMPARE_REVERSE , COMPARE_STACK_REVERSE ,
  PUSH_EXECUTE , EXECUTE_IF_SUCCESS , EXECUTE_IF_SUCCESS_REVERSE , EXECUTE_IF_FAILURE ,
  EXECUTE_IF_FAILURE_REVERSE
}
 
enum  OverlapResolutionStrategy { IGNORE_FIRST , IGNORE_SECOND , IGNORE_SMALLEST , KEEP_ALL_OVERLAPS }
 an enumerated type to indicate which kind of strategy adopt to deal with two overlapping entities More...
 
enum  SearchGraphSense { FORWARDSEARCH , BACKWARDSEARCH }
 enumerated type to indicate in which sense the automaton should be built or searched More...
 
enum  TypeTransition {
  T_EPSILON , T_STAR , T_WORD , T_POS ,
  T_LEMMA , T_NUM , T_TSTATUS , T_AND ,
  T_SET , T_DEACCENTUATED , T_ENTITY , T_ENTITY_GROUP ,
  T_GAZETEER
}
 

Functions

std::ostream & operator<< (std::ostream &os, const DFFSPos &x)
 
std::ostream & operator<< (std::ostream &os, const Automaton::DFSStack &x)
 
QDebug & operator<< (QDebug &os, const Automaton::DFSStack &x)
 
ostream & operator<< (ostream &os, const Automaton &a)
 
QDebug & operator<< (QDebug &os, const Automaton &a)
 
uint64_t LimaStringToInt (LimaString s)
 
void readTword (std::ifstream &file, Tword &s, FsaStringsPool &sp)
 
void writeTword (std::ofstream &file, const Tword &s, const FsaStringsPool &sp)
 
void readLimaString (std::ifstream &file, LimaString &s)
 
void writeLimaString (std::ofstream &file, const LimaString &s)
 
void readWordVector (std::ifstream &file, std::vector< LimaString > &wordVector)
 
void writeWordSet (std::ofstream &file, const std::set< LimaString > &wordSet)
 
void readTpos (std::ifstream &file, Tpos &p)
 
void writeTpos (std::ofstream &file, const Tpos &p)
 
bool compareTpos (const Tpos &pos, const LinguisticCode &lingProperty, const PropertyCode::PropertyAccessor &macroAccessor, const PropertyCode::PropertyAccessor &microAccessor)
 
Tstate readTstate (std::ifstream &file)
 
void writeTstate (std::ofstream &file, const Tstate s)
 
TypeTransition readTypeTransition (std::ifstream &file)
 
void writeTypeTransition (std::ofstream &file, const TypeTransition t)
 
bool operator== (const Constraint &c1, const Constraint &c2)
 
ostream & operator<< (ostream &os, const Constraint &c)
 
QDebug & operator<< (QDebug &os, const Constraint &c)
 
std::ostream & operator<< (std::ostream &os, const ConstraintCheckListElement &e)
 
std::ostream & operator<< (std::ostream &os, const ConstraintCheckList &l)
 
std::ostream & operator<< (std::ostream &os, const EntityFeatures &f)
 ‍***********************************************************************
 
QDebug & operator<< (QDebug &os, const EntityFeatures &f)
 
ostream & operator<< (ostream &os, const Recognizer &r)
 
LIMA_AUTOMATON_EXPORT std::ostream & operator<< (std::ostream &os, const RecognizerMatch &m)
 
LIMA_AUTOMATON_EXPORT QDebug & operator<< (QDebug &os, const RecognizerMatch &m)
 
ostream & operator<< (ostream &os, const Rule &r)
 
QDebug & operator<< (QDebug &os, const Rule &r)
 
ostream & operator<< (ostream &os, const Transition &t)
 
QDebug & operator<< (QDebug &os, const Transition &t)
 
ostream & operator<< (ostream &os, const TransitionUnit &t)
 
QDebug & operator<< (QDebug &os, const TransitionUnit &t)
 

Variables

ConstraintFunctionFactory< AgreementConstraint > AgreementConstraintFactory (AgreementConstraintId)
 
ConstraintFunctionFactory< GenderAgreement > GenderAgreementFactory (GenderAgreementId)
 
ConstraintFunctionFactory< NumberAgreement > NumberAgreementFactory (NumberAgreementId)
 
ConstraintFunctionFactory< LinguisticPropertyIs > LinguisticPropertyIsFactory (LinguisticPropertyIsId)
 
ConstraintFunctionFactory< LengthInInterval > LengthInIntervalFactory (LengthInIntervalId)
 
ConstraintFunctionFactory< NumericValueInInterval > NumericValueInIntervalFactory (NumericValueInIntervalId)
 
ConstraintFunctionFactory< NoSpaceWith > NoSpaceWithFactory (NoSpaceWithId)
 
SimpleFactory< AbstractResource, Recognizer > recognizerFactory (RECOGNIZER_CLASSID)
 recognizer factory
 

Typedef Documentation

◆ ConstraintCheckList

◆ DFFSPos

Definition at line 45 of file automaton.cpp.

◆ SetOfRules

the SetOfRules type is defined as a vector of pointers on Rule

Definition at line 66 of file recognizer.h.

◆ Tpos

◆ Tstate

Definition at line 41 of file automatonCommon.h.

◆ Tword

Definition at line 42 of file automatonCommon.h.

Enumeration Type Documentation

◆ ConstraintAction

Enumerator
NONE 
STORE 
COMPARE 
PUSH 
COMPARE_STACK 
TEST 
COMPARE_REVERSE 
COMPARE_STACK_REVERSE 
PUSH_EXECUTE 
EXECUTE_IF_SUCCESS 
EXECUTE_IF_SUCCESS_REVERSE 
EXECUTE_IF_FAILURE 
EXECUTE_IF_FAILURE_REVERSE 

Definition at line 33 of file constraintCheckList.h.

◆ OverlapResolutionStrategy

an enumerated type to indicate which kind of strategy adopt to deal with two overlapping entities

Enumerator
IGNORE_FIRST 

the first entity is ignored => assumes the rightmost trigger is more important

IGNORE_SECOND 

the second entity is ignored => assumes the leftmost trigger is more important

IGNORE_SMALLEST 

the smallest entity is ignored (the one that covers the smallest number of words is assumed to be less specific )

KEEP_ALL_OVERLAPS 

do not try to avoid overlaps, find the largest number of entities possible

Definition at line 43 of file recognizer.h.

◆ SearchGraphSense

enumerated type to indicate in which sense the automaton should be built or searched

Enumerator
FORWARDSEARCH 

forward search in the graph

BACKWARDSEARCH 

backward search in the graph

Definition at line 35 of file searchGraph.h.

◆ TypeTransition

Enumerator
T_EPSILON 
T_STAR 
T_WORD 
T_POS 
T_LEMMA 
T_NUM 
T_TSTATUS 
T_AND 
T_SET 
T_DEACCENTUATED 
T_ENTITY 
T_ENTITY_GROUP 
T_GAZETEER 

Definition at line 35 of file transitionUnit.h.

Function Documentation

◆ compareTpos()

bool Lima::LinguisticProcessing::Automaton::compareTpos ( const Tpos &  pos,
const LinguisticCode &  lingProperty,
const PropertyCode::PropertyAccessor &  macroAccessor,
const PropertyCode::PropertyAccessor &  microAccessor 
)

Definition at line 91 of file automatonCommon.cpp.

◆ LimaStringToInt()

LIMA_AUTOMATON_EXPORT uint64_t Lima::LinguisticProcessing::Automaton::LimaStringToInt ( LimaString  s)

Definition at line 31 of file automatonCommon.cpp.

◆ operator<<() [1/20]

ostream & Lima::LinguisticProcessing::Automaton::operator<< ( std::ostream &  os,
const Automaton &  a 
)

Definition at line 1360 of file automaton.cpp.

◆ operator<<() [2/20]

ostream & Lima::LinguisticProcessing::Automaton::operator<< ( std::ostream &  os,
const Constraint &  c 
)

Definition at line 422 of file constraint.cpp.

◆ operator<<() [3/20]

ostream & Lima::LinguisticProcessing::Automaton::operator<< ( std::ostream &  os,
const Recognizer &  r 
)

Definition at line 1113 of file recognizer.cpp.

◆ operator<<() [4/20]

ostream & Lima::LinguisticProcessing::Automaton::operator<< ( std::ostream &  os,
const Rule &  r 
)

Definition at line 333 of file rule.cpp.

◆ operator<<() [5/20]

ostream & Lima::LinguisticProcessing::Automaton::operator<< ( std::ostream &  os,
const Transition &  t 
)

Definition at line 81 of file transition.cpp.

◆ operator<<() [6/20]

ostream & Lima::LinguisticProcessing::Automaton::operator<< ( std::ostream &  os,
const TransitionUnit &  t 
)

Definition at line 139 of file transitionUnit.cpp.

◆ operator<<() [7/20]

QDebug & Lima::LinguisticProcessing::Automaton::operator<< ( QDebug &  os,
const Automaton &  a 
)

Definition at line 1379 of file automaton.cpp.

◆ operator<<() [8/20]

QDebug & Lima::LinguisticProcessing::Automaton::operator<< ( QDebug &  os,
const Automaton::DFSStack &  x 
)

Definition at line 473 of file automaton.cpp.

◆ operator<<() [9/20]

QDebug & Lima::LinguisticProcessing::Automaton::operator<< ( QDebug &  os,
const Constraint &  c 
)

Definition at line 457 of file constraint.cpp.

◆ operator<<() [10/20]

QDebug & Lima::LinguisticProcessing::Automaton::operator<< ( QDebug &  os,
const EntityFeatures &  f 
)

Definition at line 253 of file EntityFeatures.cpp.

◆ operator<<() [11/20]

LIMA_AUTOMATON_EXPORT QDebug & Lima::LinguisticProcessing::Automaton::operator<< ( QDebug &  os,
const RecognizerMatch &  m 
)

Definition at line 394 of file recognizerMatch.cpp.

◆ operator<<() [12/20]

QDebug & Lima::LinguisticProcessing::Automaton::operator<< ( QDebug &  os,
const Rule &  r 
)

Definition at line 349 of file rule.cpp.

◆ operator<<() [13/20]

QDebug & Lima::LinguisticProcessing::Automaton::operator<< ( QDebug &  os,
const Transition &  t 
)

Definition at line 85 of file transition.cpp.

◆ operator<<() [14/20]

QDebug & Lima::LinguisticProcessing::Automaton::operator<< ( QDebug &  os,
const TransitionUnit &  t 
)

Definition at line 162 of file transitionUnit.cpp.

◆ operator<<() [15/20]

std::ostream & Lima::LinguisticProcessing::Automaton::operator<< ( std::ostream &  os,
const Automaton::DFSStack &  x 
)

Definition at line 459 of file automaton.cpp.

◆ operator<<() [16/20]

LIMA_AUTOMATON_EXPORT std::ostream & Lima::LinguisticProcessing::Automaton::operator<< ( std::ostream &  os,
const ConstraintCheckList &  l 
)

Definition at line 94 of file constraintCheckList.cpp.

◆ operator<<() [17/20]

std::ostream & Lima::LinguisticProcessing::Automaton::operator<< ( std::ostream &  os,
const ConstraintCheckListElement &  e 
)

Definition at line 87 of file constraintCheckList.cpp.

◆ operator<<() [18/20]

std::ostream & Lima::LinguisticProcessing::Automaton::operator<< ( std::ostream &  os,
const DFFSPos &  x 
)

Definition at line 371 of file automaton.cpp.

◆ operator<<() [19/20]

std::ostream & Lima::LinguisticProcessing::Automaton::operator<< ( std::ostream &  os,
const EntityFeatures &  f 
)

‍***********************************************************************

Definition at line 241 of file EntityFeatures.cpp.

◆ operator<<() [20/20]

LIMA_AUTOMATON_EXPORT std::ostream & Lima::LinguisticProcessing::Automaton::operator<< ( std::ostream &  os,
const RecognizerMatch &  m 
)

Definition at line 379 of file recognizerMatch.cpp.

◆ operator==()

bool Lima::LinguisticProcessing::Automaton::operator== ( const Constraint &  c1,
const Constraint &  c2 
)

Definition at line 304 of file constraint.cpp.

◆ readLimaString()

void Lima::LinguisticProcessing::Automaton::readLimaString ( std::ifstream &  file,
LimaString &  s 
)

Definition at line 50 of file automatonCommon.cpp.

◆ readTpos()

void Lima::LinguisticProcessing::Automaton::readTpos ( std::ifstream &  file,
Tpos &  p 
)

Definition at line 82 of file automatonCommon.cpp.

◆ readTstate()

Tstate Lima::LinguisticProcessing::Automaton::readTstate ( std::ifstream &  file)
inline

Definition at line 49 of file automatonCommon.h.

◆ readTword()

void Lima::LinguisticProcessing::Automaton::readTword ( std::ifstream &  file,
Tword &  s,
FsaStringsPool &  sp 
)

Definition at line 38 of file automatonCommon.cpp.

◆ readTypeTransition()

TypeTransition Lima::LinguisticProcessing::Automaton::readTypeTransition ( std::ifstream &  file)

Definition at line 54 of file automatonReaderWriter.cpp.

◆ readWordVector()

void Lima::LinguisticProcessing::Automaton::readWordVector ( std::ifstream &  file,
std::vector< LimaString > &  wordVector 
)

Definition at line 60 of file automatonCommon.cpp.

◆ writeLimaString()

void Lima::LinguisticProcessing::Automaton::writeLimaString ( std::ofstream &  file,
const LimaString &  s 
)

Definition at line 54 of file automatonCommon.cpp.

◆ writeTpos()

void Lima::LinguisticProcessing::Automaton::writeTpos ( std::ofstream &  file,
const Tpos &  p 
)

Definition at line 86 of file automatonCommon.cpp.

◆ writeTstate()

void Lima::LinguisticProcessing::Automaton::writeTstate ( std::ofstream &  file,
const Tstate  s 
)
inline

Definition at line 50 of file automatonCommon.h.

◆ writeTword()

void Lima::LinguisticProcessing::Automaton::writeTword ( std::ofstream &  file,
const Tword &  s,
const FsaStringsPool &  sp 
)

Definition at line 44 of file automatonCommon.cpp.

◆ writeTypeTransition()

void Lima::LinguisticProcessing::Automaton::writeTypeTransition ( std::ofstream &  file,
const TypeTransition  t 
)

Definition at line 57 of file automatonReaderWriter.cpp.

◆ writeWordSet()

void Lima::LinguisticProcessing::Automaton::writeWordSet ( std::ofstream &  file,
const std::set< LimaString > &  wordSet 
)

Definition at line 70 of file automatonCommon.cpp.

Variable Documentation

◆ AgreementConstraintFactory

ConstraintFunctionFactory< AgreementConstraint > Lima::LinguisticProcessing::Automaton::AgreementConstraintFactory(AgreementConstraintId) ( AgreementConstraintId  )

◆ GenderAgreementFactory

ConstraintFunctionFactory< GenderAgreement > Lima::LinguisticProcessing::Automaton::GenderAgreementFactory(GenderAgreementId) ( GenderAgreementId  )

◆ LengthInIntervalFactory

ConstraintFunctionFactory< LengthInInterval > Lima::LinguisticProcessing::Automaton::LengthInIntervalFactory(LengthInIntervalId) ( LengthInIntervalId  )

◆ LinguisticPropertyIsFactory

ConstraintFunctionFactory< LinguisticPropertyIs > Lima::LinguisticProcessing::Automaton::LinguisticPropertyIsFactory(LinguisticPropertyIsId) ( LinguisticPropertyIsId  )

◆ NoSpaceWithFactory

ConstraintFunctionFactory< NoSpaceWith > Lima::LinguisticProcessing::Automaton::NoSpaceWithFactory(NoSpaceWithId) ( NoSpaceWithId  )

◆ NumberAgreementFactory

ConstraintFunctionFactory< NumberAgreement > Lima::LinguisticProcessing::Automaton::NumberAgreementFactory(NumberAgreementId) ( NumberAgreementId  )

◆ NumericValueInIntervalFactory

ConstraintFunctionFactory< NumericValueInInterval > Lima::LinguisticProcessing::Automaton::NumericValueInIntervalFactory(NumericValueInIntervalId) ( NumericValueInIntervalId  )

◆ recognizerFactory

SimpleFactory< AbstractResource, Recognizer > Lima::LinguisticProcessing::Automaton::recognizerFactory(RECOGNIZER_CLASSID) ( RECOGNIZER_CLASSID  )

recognizer factory