Proofread
Fixes typos, duplicate words, etc. Generates a new output.
There was a block nearby.
Use Proofread Skill to proofread:
Benchmarks
Coming soon...
Output labels
Type | Value |
---|---|
replacement | The text to replace the indices |
Parameters
None.
Example
Request
curl -X POST \
'https://api.oneai.com/api/v0/pipeline' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'api-key: <YOUR-API-KEY-HERE>' \
-d '{
"input": [{ "speaker": "John", "utterance": "There was a second second accident at the same time in the blok nearby.", "timestamp": "0:00" }, { "speaker": "speaker 2", "utterance": "..." }],
"content_type": "application/json",
"steps": [
{
"skill": "enhance"
}
]
}'
const OneAI = require("oneai");
const oneai = new OneAI("<YOUR-API-KEY-HERE>");
const conversation = new oneai.Conversation(
[{ "speaker": "John", "utterance": "There was a second second accident at the same time in the blok nearby.", "timestamp": "0:00" }, { "speaker": "speaker 2", "utterance": "..." }]
);
const pipeline = new oneai.Pipeline(
oneai.skills.proofread(),
);
pipeline.run(conversation).then(consol.log);
import oneai
oneai.api_key = "<YOUR-API-KEY-HERE>"
pipeline = oneai.Pipeline(
steps = [
oneai.skills.Proofread(),
]
)
conversation = oneai.Conversation(
[{ "speaker": "John", "utterance": "There was a second second accident at the same time in the blok nearby.", "timestamp": "0:00" }, { "speaker": "speaker 2", "utterance": "..." }]
)
output = pipeline.run(conversation)
Response
{
"input_text": "John:\nThere was a second second accident at the same time in the blok nearby.\n\n",
"status": "success",
"output": [
{
"text_generated_by_step_name": "enhance",
"text_generated_by_step_id": 1,
"text": "John:\nThere was a second accident at the same time in the block nearby.\n\n",
"labels": [
{
"type": "replacement",
"skill": "enhance",
"value": "second",
"speaker": "John",
"span_text": "",
"span": [
18,
18
],
"output_spans": [
{
"section": 0,
"start": 12,
"end": 12
}
]
},
{
"type": "replacement",
"skill": "enhance",
"value": "blok",
"speaker": "John",
"span_text": "block",
"span": [
58,
63
],
"output_spans": [
{
"section": 0,
"start": 52,
"end": 57
}
]
}
]
}
],
"stats": {
"concurrency_wait_time": 0,
"total_running_jobs": 1,
"total_waiting_jobs": 0
}
}
{
text: '[0:00] John:\n' +
'There was a second second accident at the same time in the blok nearby.\n' +
'\n' +
'speaker 2:\n' +
'...\n' +
'\n',
proofread: {
text: '[0:00] John:\n' +
'There was a second accident at the same time in the block nearby.\n' +
'\n' +
'speaker 2:\n' +
'\n' +
'\n',
replacements: [
{
type: 'replacement',
skill: 'enhance',
value: 'second',
speaker: 'John',
span_text: '',
span: [ 25, 25 ],
output_spans: [ { section: 0, start: 12, end: 12 } ]
},
{
type: 'replacement',
skill: 'enhance',
value: 'blok',
speaker: 'John',
span_text: 'block',
span: [ 65, 70 ],
output_spans: [ { section: 0, start: 52, end: 57 } ]
},
{
type: 'replacement',
skill: 'enhance',
value: '...',
speaker: 'speaker 2',
span_text: '',
span: [ 91, 91 ],
output_spans: [ { section: 1, start: 0, end: 0 } ]
}
]
}
}
Updated 15 days ago