diff options
Diffstat (limited to 'phrase-extract/SyntaxNodeCollection.h')
-rw-r--r-- | phrase-extract/SyntaxNodeCollection.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/phrase-extract/SyntaxNodeCollection.h b/phrase-extract/SyntaxNodeCollection.h index 405a77c5f..da0e1eca3 100644 --- a/phrase-extract/SyntaxNodeCollection.h +++ b/phrase-extract/SyntaxNodeCollection.h @@ -55,11 +55,13 @@ public: return m_nodes; }; - size_t GetNumWords() const { - return m_numWords; - } + //! Get the number of words (defined as 1 + the max end pos of any node). + std::size_t GetNumWords() const { return m_numWords; } + + //! Clear the container (this deletes the SyntaxNodes). void Clear(); + //! Extract a SyntaxTree (assuming the collection's nodes constitute a tree). std::auto_ptr<SyntaxTree> ExtractTree(); private: |