Esempio n. 1
0
bool ResidentVocabulary::_containsSym(Sym symId) const {
  return getVocab(symId.type()).containsSym(symId);
}
Esempio n. 2
0
File: Sym.hpp Progetto: graehl/hyp
 inline void operator-=(Sym delta) {
   assert(delta.type() == type());
   operator-=(delta.index());
 }
Esempio n. 3
0
bool ResidentVocabulary::_boundsSym(Sym symId) const {
  return getVocab(symId.type()).boundsSym(symId);
}
Esempio n. 4
0
 bool containsSym(Sym sym) const {
   assert(sym.type() == type_);
   SymInt index = sym.index();
   assert(index >= offset_);
   return index - offset_ < symbols_.size();
 }
Esempio n. 5
0
inline bool isAnnotation(Sym sym) {
  return sym.type() == kSpecialTerminal && !isFstComposeSpecial(sym);
}
Esempio n. 6
0
inline bool specialTerminalIsAnnotation(Sym specialTerminal) {
  assert(specialTerminal.type() == kSpecialTerminal);
  return !isFstComposeSpecial(specialTerminal);
}