Package jazzparser :: Package data :: Package corpora
[hide private]
[frames] | no frames]

Package corpora

source code

File I/O and internal representations for other people's corpora.

This package contains modules for reading in (and potentially writing out) data from other people's corpora and classes for representing and manipulating the data.

My own data is stored using the classes in the Django database definition or those in jazzparser.data.db_mirrors.


Author: Mark Granroth-Wilding <mark.granroth-wilding@ed.ac.uk>

Submodules [hide private]

Classes [hide private]
  CorpusError
Functions [hide private]
 
get_corpus_file(corpus_name, file_path)
Load a file from a named corpus that is stored within the project.
source code
 
list_corpus_files(corpus_name)
Produces a list of the files in the corpus with the given name.
source code
Variables [hide private]
  __kp_info = {'extensions': ['q.k'], 'location': ('kostka-payne')}
  CORPORA = {'kostka-payne': {'extensions': ['q.k'], 'location':...
Available corpus datasets, indexed by names by which they can be loaded.
  __package__ = None
hash(x)
Function Details [hide private]

get_corpus_file(corpus_name, file_path)

source code 

Load a file from a named corpus that is stored within the project. If the file is not found, we'll attempt to append the default file extensions defined for this corpus until we find one that exists.

Parameters:
  • corpus_name (str) - name of the corpus
  • file_path (list of strs or str) - path to file to be loaded, split into a list, or as a string in the style of the local system's paths.

list_corpus_files(corpus_name)

source code 

Produces a list of the files in the corpus with the given name. Each file is represented by its path, split into a list.


Variables Details [hide private]

CORPORA

Available corpus datasets, indexed by names by which they can be loaded.

Value:
{'kostka-payne': {'extensions': ['q.k'], 'location': ('kostka-payne')}\
,
 'kp': {'extensions': ['q.k'], 'location': ('kostka-payne')}}