Package nltk :: Package corpus :: Package reader :: Module toolbox
[hide private]
[frames] | no frames]

Module toolbox

source code

Module for reading, writing and manipulating Toolbox databases and settings files.

Classes [hide private]
  ToolboxCorpusReader
  StandardFormat
Class for reading and processing standard format marker files and strings.
  ToolboxData
  ToolboxSettings
This class is the base class for settings files.
Functions [hide private]
string
to_sfm_string(tree, encoding=None, errors='strict', unicode_fields=None)
Return a string with a standard format representation of the toolbox data in tree (tree can be a toolbox database or a single record).
source code
 
to_settings_string(tree, encoding=None, errors='strict', unicode_fields=None) source code
 
_to_settings_string(node, l, **kwargs) source code
 
demo() source code
Variables [hide private]
  _is_value = re.compile(r'\S')
Function Details [hide private]

to_sfm_string(tree, encoding=None, errors='strict', unicode_fields=None)

source code 

Return a string with a standard format representation of the toolbox data in tree (tree can be a toolbox database or a single record).

Parameters:
  • tree (ElementTree._ElementInterface) - flat representation of toolbox data (whole database or single record)
  • encoding (string) - Name of an encoding to use.
  • errors (string) - Error handling scheme for codec. Same as the encode inbuilt string method.
  • unicode_fields (string)
Returns: string
string using standard format markup