Cambridge SMT System
ucam::hifst::PatternCompareTool Class Reference

Class that provides "pattern" comparison between two const char *. The "patterns" are an abstraction of any non-terminal A-Z. So for instance, consider non_terminals A and Z. A rule with source 3_A_5 and another one with source 3_Z_5 are equivalent and need to be listed together (with any other equivalent sources). This class can be used with PosIndexCompare as it inherits from CompareTool. More...

#include <data.grammar.comparetool.hpp>

Inheritance diagram for ucam::hifst::PatternCompareTool:
Collaboration diagram for ucam::hifst::PatternCompareTool:

Public Member Functions

virtual __always_inline int compare (const char *s1, const char *s2)
 
virtual __always_inline int ncompare (const char *s1, const char *s2, uint n)
 

Detailed Description

Class that provides "pattern" comparison between two const char *. The "patterns" are an abstraction of any non-terminal A-Z. So for instance, consider non_terminals A and Z. A rule with source 3_A_5 and another one with source 3_Z_5 are equivalent and need to be listed together (with any other equivalent sources). This class can be used with PosIndexCompare as it inherits from CompareTool.

Definition at line 93 of file data.grammar.comparetool.hpp.

Member Function Documentation

virtual __always_inline int ucam::hifst::PatternCompareTool::compare ( const char *  s1,
const char *  s2 
)
inlinevirtual

Reimplemented from ucam::hifst::CompareTool.

Definition at line 95 of file data.grammar.comparetool.hpp.

virtual __always_inline int ucam::hifst::PatternCompareTool::ncompare ( const char *  s1,
const char *  s2,
uint  n 
)
inlinevirtual

Nothing to compare? Return zero.

Reimplemented from ucam::hifst::CompareTool.

Definition at line 112 of file data.grammar.comparetool.hpp.


The documentation for this class was generated from the following file: