Python LMF library
 All Classes Namespaces Files Functions Variables
Functions
pylmflib.pylmflib.input.mdf Namespace Reference

Functions

def mdf_read
 Read an MDF file. More...
 

Function Documentation

def pylmflib.pylmflib.input.mdf.mdf_read (   filename = None,
  mdf2lmf = mdf_lmf,
  lexicon = None,
  id = None,
  encoding = ENCODING 
)

Read an MDF file.

Parameters
filenameThe name of the MDF file to read with full path, for instance 'user/input.txt'.
mdf2lmfA Python dictionary describing the mapping between MDF markers and LMF representation. Default value is 'mdf_lmf' dictionary defined in 'pylmflib/config/mdf.py'. Please refer to it as an example.
lexiconAn existing Lexicon to fill with lexical entries to read.
idA Python string identifying the lexicon to create.
encodingUse 'utf-8' encoding by default. Otherwise, user has to precise the native encoding of its document.
Returns
A Lexicon instance containing all lexical entries.

Definition at line 13 of file mdf.py.