Lf
LFBase
Bases: ABC
Abstract labelling function. Uses to annotate
Source code in src/annotation/lf.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
__init__(taxonomy)
Taxonomy containing labels to annotate the examples with.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
taxonomy |
TaxonomyBase
|
|
required |
Source code in src/annotation/lf.py
12 13 14 15 16 17 18 |
|
annotate(name, content)
Annotate an example given the file name and it's content.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
Source file name |
required |
content |
str
|
Content of the file (usually identifiers) |
required |
Returns:
Type | Description |
---|---|
array
|
|
Source code in src/annotation/lf.py
20 21 22 23 24 25 26 27 |
|