- API docs
- CLI
- Integration guides
- Blog
- How machines learn to understand words: a guide to embeddings in NLP
- Prompt-based learning with Transformers
- Efficient Transformers II: knowledge distillation & fine-tuning
- Efficient Transformers I: attention mechanisms
- Deep hierarchical unsupervised intent modelling: getting value without training data
- Fixing annotating bias with Communications Mining
- Active learning: better ML models in less time
- It's all in the numbers - assessing model performance with metrics
- Why model validation is important
- Comparing Communications Mining and Google AutoML for conversational data intelligence
Communications Mining Developer Guide
Batch download
The CLI allows you to download comments and predictions in batch. This is most useful to script import into analytics tools that don't require a live connection.
The command below will download all the comments and predictions in the specified source and dataset. Note that the dataset name and source name have to be prefixed by the name of the project they are in. If the dataset contains multiple sources, you need to issue this command for every source to download all comments in the dataset.
re get comments project/source-name --dataset project/dataset-name --predictions=true -f output.jsonl
re get comments project/source-name --dataset project/dataset-name --predictions=true -f output.jsonl
Which model version does the CLI use to get predictions?
The CLI will download the latest available computed predictions. These are the same predictions shown in the UI.
If you need predictions from a specific model version, consider using the or the predict API routes.
The CLI returns data in JSONL format (also called newline-delimited JSON), where each line is a JSON value. Many tools will be able to process JSONL files out-of-the-box. Please contact support if you have any questions.
Each line in the JSONL file will have the following format:
{
"comment": {...},
"annotating": {
"assigned": [...]
"predicted": [...]
},
"entities": {
"assigned": [...]
"predicted": [...]
}
}
{
"comment": {...},
"annotating": {
"assigned": [...]
"predicted": [...]
},
"entities": {
"assigned": [...]
"predicted": [...]
}
}
FIELD NAME | DESCRIPTION |
---|---|
comment | Comment object in the format described here. |
annotating.assigned | List of assigned labels, in the format described here. |
entities.assigned | List of assigned entities, in the format described here. |
annotating.predicted | List of predicted labels, in the format described here. |
entities.predicted | List of predicted entities, in the format described here. |
annotating
or entities
field may be absent completely if the comment has neither assigned nor predicted labels or entities.
Below is an example comment with predictions downloaded from a real-life dataset.
{
"comment": {
"id": "1234abcd",
"uid": "5678ef.1234abdc",
"timestamp": "2021-02-01T00:00:00Z",
"messages": [
{
"body": {
"text": "The hot chocolate biscuit on arrival raised my expectations"
}
}
],
"user_properties": {
"string:Question": "What did you like about your stay",
"number:Reviewer Score": 5.4,
"number:Average Score": 8.4,
"number:Reviewer Total Number Of Reviews": 1,
"string:Hotel Name": "DoubleTree by Hilton London Victoria"
},
"created_at": "2021-02-01T00:00:00Z"
},
"annotating": {
"predicted": [
{
"name": "Refreshments",
"sentiment": 0.3598046874571062,
"probability": 0.54764723591506481
},
{
"name": "Property",
"sentiment": 0.6684685489411859,
"probability": 0.417815982922911644
}
]
}
}
{
"comment": {
"id": "1234abcd",
"uid": "5678ef.1234abdc",
"timestamp": "2021-02-01T00:00:00Z",
"messages": [
{
"body": {
"text": "The hot chocolate biscuit on arrival raised my expectations"
}
}
],
"user_properties": {
"string:Question": "What did you like about your stay",
"number:Reviewer Score": 5.4,
"number:Average Score": 8.4,
"number:Reviewer Total Number Of Reviews": 1,
"string:Hotel Name": "DoubleTree by Hilton London Victoria"
},
"created_at": "2021-02-01T00:00:00Z"
},
"annotating": {
"predicted": [
{
"name": "Refreshments",
"sentiment": 0.3598046874571062,
"probability": 0.54764723591506481
},
{
"name": "Property",
"sentiment": 0.6684685489411859,
"probability": 0.417815982922911644
}
]
}
}