We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 753c3ce commit 702f73eCopy full SHA for 702f73e
src/clients/detector.rs
@@ -96,6 +96,8 @@ pub struct ContentAnalysisResponse {
96
pub start: usize,
97
/// End index of detection
98
pub end: usize,
99
+ /// Text corresponding to detection
100
+ pub text: String,
101
/// Relevant detection class
102
pub detection: String,
103
/// Detection type or aggregate detection label
@@ -112,7 +114,7 @@ impl From<ContentAnalysisResponse> for crate::models::TokenClassificationResult
112
114
Self {
113
115
start: value.start as u32,
116
end: value.end as u32,
- word: "".to_string(), // TODO: fill in when provided in the detector API in the next iteration
117
+ word: value.text,
118
entity: value.detection,
119
entity_group: value.detection_type,
120
score: value.score,
0 commit comments