Table of Contents

Class: Alphabet /amd/bernoulli/1/home/abt_vin/georgi/hmm/0.7/ghmm//ghmmwrapper/ghmm.py

Discrete, finite alphabet

Base Classes   
EmissionDomain
Methods   
__eq__
__hash__
__init__
__len__
__str__
external
externalSequence
getExternalCharacterLength
internal
internalSequence
isAdmissable
size
  __eq__ 
__eq__ ( self,  alph )

  __hash__ 
__hash__ ( self )

  __init__ 
__init__ ( self,  listOfCharacters )

Creates an alphabet out of a listOfCharacters @param listOfCharacters: a list of strings (single characters most of the time), ints, or other objects that can be used as dictionary keys for a mapping of the external sequences to the internal representation

Note: Alphabets should be considered as imutable. That means the listOfCharacters and the mapping should never be touched after construction.

  __len__ 
__len__ ( self )

  __str__ 
__str__ ( self )

  external 
external ( self,  internal )

Given an internal representation return the external representation

Note: the internal code -1 always represents a gap character -

Raises KeyError

Exceptions   
KeyError, "Internal symbol " + str( internal ) + " not recognized."
  externalSequence 
externalSequence ( self,  internalSequence )

Given a sequence with the internal representation return the external representation

Exceptions   
KeyError
  getExternalCharacterLength 
getExternalCharacterLength ( self )

If all external characters are of the same length the length is returned. Otherwise None. @return: length of the external characters or None

  internal 
internal ( self,  emission )

Given a emission return the internal representation

  internalSequence 
internalSequence ( self,  emissionSequence )

Given a emission_sequence return the internal representation

Raises KeyError

Exceptions   
KeyError
  isAdmissable 
isAdmissable ( self,  emission )

Check whether emission is admissable (contained in) the domain

  size 
size ( self )

Deprecated


Table of Contents

This document was automatically generated on Fri Jan 20 14:56:59 2006 by HappyDoc version WORKING