Tanl Linguistic Pipeline

Tanl::Text::WordIndex Struct Reference

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

#include <WordIndex.h>

Inheritance diagram for Tanl::Text::WordIndex:
Tanl::unordered_map< const char *, unsigned, hash< const char * >, eqstr > Tanl::AttributeIndex Tanl::AttributeIndex

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.


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.

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


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
 
Copyright © 2005-2011 G. Attardi. Generated on 4 Mar 2011 by doxygen 1.6.1.