TextAnalyzer Pipeline
Python module for using NLP bias analysis models.
1. Import
2. Initialize the Module
Customize your pipeline
bias
None
: Default (no bias sequence classification).
When set to ternary
this adds two fields to the "text" dictionary in the return dictionary: label
(as shown above) and score
(0-1).
classes
Classify the types of bias a sentence contains:
False
: Default (no bias aspects classification).
When set to True
, this adds one field to the "text" dictionary in the return dictionary: aspects
(which contains top_k_classes
in [CLASS]: [SCORE] format).
top_k_classes
Number of classes returned in the aspects
dict.
Int:
1
to11
(defaults to3
).
Only relevant when classes
is set to True
.
ner
None
: Default (no token classification)
When in use, it appends a new "ner"
dictionary to the return dictionary.
3. Run Bias Analysis
4. Example Output
Last updated