summaryrefslogtreecommitdiff
path: root/decoder/sentences.h
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/sentences.h')
-rwxr-xr-xdecoder/sentences.h8
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);