Skip to content

Disturbance

Disturbance Object

Spell-checking object. Each token is associated with an object and is checked against our dictionary. If the token does not exist, a list of candidates will be suggested along with the most likely replacement. Gender and plural are not taken into account as the lemma will be the same regardless.

KEYTYPEDESCRIPTIONCONSTRAINTS
originalstringtoken as found in the sentence-
predictstringpredicted token after spell-checking, same as original for valid words-
probabilitiesdictionarycandidates for correction with correspond rank (0 being the most likely candidate)Key only exists if word should be corrected
to_correctint1 if token should be corrected but no replacement has been found0 or 1

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';

<Tabs> <TabItem value="py" label="Python">

[
  {
  "original":"pierre",
  "predict":"pierre",
  "to_correct":0
  },
  {
  "original":"aime",
  "predict":"aime",
  "to_correct":0
  },
  {
  "original":"les",
  "predict":"les",
  "to_correct":0
  },
  {
  "original":"banans",
  "predict":"banane",
  "probabilities":{
      "banals":2,
      "banane":0,
      "bananes":1,
      "banats":3,
      "banians":3,
      "bannans":3,
      "bannas":3,
      "bavans":3,
      "nanans":3
    },
  "to_correct":0
  }
]

</TabItem> <TabItem value="json" label="JSON">

[
  {
  "original":"pierre",
  "predict":"pierre",
  "to_correct":0
  },
  {
  "original":"aime",
  "predict":"aime",
  "to_correct":0
  },
  {
  "original":"les",
  "predict":"les",
  "to_correct":0
  },
  {
  "original":"banans",
  "predict":"banane",
  "probabilities":{
      "banals":2,
      "banane":0,
      "bananes":1,
      "banats":3,
      "banians":3,
      "bannans":3,
      "bannas":3,
      "bavans":3,
      "nanans":3
    },
  "to_correct":0
  }
]

</TabItem> </Tabs>

register-sticky