load module¶
This module contains the Load class The load class load objects from file
-
class
load.
Load
(adr, type='SPiCe')[source]¶ Bases:
object
A load instance
Example: >>> from sp2learn import Load >>> l = Load('adr').load_Spice_Sample()
- Input:
Parameters: -
load_Spice_Sample
(lrows=[], lcolumns=[], version='classic', partial=False)[source]¶ - Load a sample from a Spice file and returns a dictionary
- (word,count)
- Input:
Parameters: - lrows (int or list of int) – number or list of rows, a list of strings if partial=True; otherwise, based on pref if version=”classic” or “prefix”, fact otherwise
- lcolumns (int or list of int) – number or list of columns a list of strings if partial=True ; otherwise, based on suff if version=”classic” or “suffix”, fact otherwise
- version (string) – (default = “classic”) version name
- partial (boolean) – (default value = False) build of partial if True partial dictionaries are loaded based on nrows and lcolumns
- Output:
Returns: nbL , nbEx , dsample , dpref , dsuff , dfact Return type: int , int , dict , dict , dict , dict