mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-07 12:10:36 +03:00
19 lines
351 B
C
19 lines
351 B
C
|
#pragma once
|
||
|
/*
|
||
|
* score.h
|
||
|
* extract
|
||
|
*
|
||
|
* Created by Hieu Hoang on 28/07/2010.
|
||
|
* Copyright 2010 __MyCompanyName__. All rights reserved.
|
||
|
*
|
||
|
*/
|
||
|
#include <string>
|
||
|
|
||
|
|
||
|
inline bool isNonTerminal( std::string &word )
|
||
|
{
|
||
|
return (word.length()>=3 &&
|
||
|
word.substr(0,1).compare("[") == 0 &&
|
||
|
word.substr(word.length()-1,1).compare("]") == 0);
|
||
|
}
|