Common options¶
These options are not specific to any script. In the case you import patterns from other scripts, Qumin retrieves the options you used when computing the patterns.
- class qumin.utils.config.QuminConfig(*, action=Actions.patterns, data, patterns=None, pos=None, lexemes=None, cells=None, sample_lexemes=None, sample_cells=None, force_random=False, seed=1, force=False, cpus=1, resegment=False, checkSegments=True, pats=<factory>, lattice=<factory>, heatmap=<factory>, pred=<factory>, entropy='${oc.deprecated:pred}')[source]
- Parameters:
action (Actions) – Action, one of: patterns, pred (H is deprecated), lattice, macroclasses, heatmap, pred_heatmap (ent_heatmap is deprecated)
data (str) – Path to paralex.package.json paradigms, segments
cells (Any | None) – Cells to use (subset)
pos (Any | None) – Parts of speech to use (subset)
patterns (str | None) – Path to pattern computation metadata. If null, will compute patterns.
lexemes (str | None) – Lexemes to use (subset), path to a file with one lexeme id per row
sample_lexemes (int | None) – A number of lexemes to sample, for debug purposes.
sample_cells (int | None) – A number of cells to sample, for debug purposes. Samples by frequency if possible, otherwise randomly.
force_random (bool) – Whether to force random sampling.
seed (int) – Random seed for reproducible random effects.
force (bool) – Whether to overpass RAM usage security (2GB)
cpus (int) – Number of cpus to use for big computations Defaults to 1. 0 sets the number of available cpus to the maximum - 2. WARNING: cpus > 1 is unavailable for now in Windows and Mac. Whether to ignore spaces in phon forms and re-compute phonemic segmentation
resegment (bool) – Whether to resegment phonological forms.
checkSegments (bool) – Whether to control if all forms contain licit segments.
pats (PatternsConfig) – Configuration for the
patternsaction.lattice (LatticeConfig) – Configuration for the
latticeaction.heatmap (HeatmapConfig) – Configuration for the
pred_heatmapaction.pred (PredictabilityConfig) – Configuration for the
predaction.entropy (PredictabilityConfig)
Changed in version 3.2.0: Namespace
entropyis replaced bypred.
Values for the action keyword:
- class qumin.utils.config.Actions(*values)[source]
Available actions. Each action triggers a different script.
Changed in version 3.2.0: Actions
Handent_heatmapare replaced bypredandpred_heatmap.
The default configuration for these keys looks like this:
action: patterns
data: ???
patterns: null
pos: null
lexemes: null
cells: null
sample_lexemes: null
sample_cells: null
force_random: false
seed: 1
force: false
cpus: 1
resegment: false
checkSegments: true
pats: See relevant CLI documentation
lattice: See relevant CLI documentation
heatmap: See relevant CLI documentation
pred: See relevant CLI documentation
entropy: See relevant CLI documentation
See the full Default configuration