DeSR Dependency Parser

Tanl::Text::WordIndex Struct Reference

Associates an ID to each word in a set. More...

#include <WordIndex.h>

Inheritance diagram for Tanl::Text::WordIndex:

Inheritance graph
Collaboration diagram for Tanl::Text::WordIndex:

Collaboration graph

List of all members.

Public Types

typedef unordered_map< const
char *, unsigned, hash< const
char * >, eqstr > 
HashMap

Public Member Functions

 WordIndex (WordIndex const &other)
void clear ()
mapped_type index (const key_type &key)
 Get the index associated to a word key.
mapped_type insert (const key_type &key)
 Add a new word.
std::pair< iterator, bool > insert (const value_type &__obj)
 Ensure we have our own copy of words.
mapped_type & operator[] (const key_type &_Keyval)
WordIndexoperator= (const WordIndex &wi)

Static Public Attributes

static const unsigned None = (unsigned)-1


Detailed Description

Associates an ID to each word in a set.

Definition at line 64 of file WordIndex.h.


Member Function Documentation

mapped_type Tanl::Text::WordIndex::index ( const key_type &  key  )  [inline]

Get the index associated to a word key.

Returns:
the index associated to the word or None if not present.

Definition at line 90 of file WordIndex.h.

Referenced by Tanl::Attributes::get(), Tanl::Attributes::index(), and Parser::MultiSvmParser::train().


The documentation for this struct was generated from the following file:
 
Copyright © 2005-2007 G. Attardi. Generated on 13 Aug 2009 by doxygen 1.5.7.1.