diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-23 22:12:06 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-07-23 22:12:06 +0000 |
commit | 3e1f5d7ad9aff3e572e25e0afc2ae10b438e8962 (patch) | |
tree | 77c8c7b55de7d3e458cd6fa079f4ee12f35480e0 /decoder/sentences.h | |
parent | b9574d2c459b60037bf1e97e64e0c4aed524a71c (diff) |
pretty
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@390 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'decoder/sentences.h')
-rwxr-xr-x | decoder/sentences.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/decoder/sentences.h b/decoder/sentences.h index 482d3be9..452fb21e 100755 --- a/decoder/sentences.h +++ b/decoder/sentences.h @@ -30,6 +30,14 @@ inline void wordcpy(WordID *dest,WordID const* src,WordID const* src_end) { wordcpy(dest,src,src_end-src); } +inline Sentence singleton_sentence(WordID t) { + return Sentence(1,t); +} + +inline Sentence singleton_sentence(std::string const& s) { + return singleton_sentence(TD::Convert(s)); +} + inline std::ostream & operator<<(std::ostream &out,Sentence const& s) { return out<<TD::GetString(s); |