Dyslexia Word Swap

This test assesses the NLP model’s capability to handle input text with common word swap errors associated with dyslexia. A Dyslexia Word Swap dictionary is employed to apply the most common word swap errors found in dyslexic writing to the input data.

alias_name: dyslexia_word_swap

To test QA models, we are using QAEval from Langchain where we need to use the model itself or other ML model for evaluation, which can make mistakes.

Config

dyslexia_word_swap:
    min_pass_rate: 0.7
    prob: 0.5 # Defaults to 1.0, which means all words will be transformed.

You can adjust the level of transformation in the sentence by using the “prob” parameter, which controls the proportion of words to be changed during dyslexia_word_swap test.

  • min_pass_rate (float): Minimum pass rate to pass the test.
  • prob (float): Controls the proportion of words to be changed.

Examples

Original Test Case
Please, you should be careful and must wear a mask. Please, you should be careful and must where a mask.
Biden hails your relationship with Australia just days after new partnership drew ire from France. Biden hails you’re relationship with Australia just days after new partnership drew ire from France.