class_docstr: Western Airlines Surname Match Rating Algorithm comparison rating
  https://en.wikipedia.org/wiki/Match_rating_approach
  https://github.com/Yomguithereal/talisman/blob/master/src/metrics/mra.js
class_docstr_tok: ["Western","Airlines","Surname","Match","Rating","Algorithm","comparison","rating","https",":","\/\/en.wikipedia.org\/wiki\/Match_rating_approach","https",":","\/\/github.com\/Yomguithereal\/talisman\/blob\/master\/src\/metrics\/mra.js"]
code: def _calc_mra(self, word: str) -> str:
      if not word:
          return word
      word = word.upper()
      word = word[0] + "".join(c for c in word[1:] if c not in "AEIOU")
      # remove repeats like an UNIX uniq
      word = "".join(char for char, _ in groupby(word))
      if len(word) > 6:
          return word[:3] + word[-3:]
      return word
  
file_path: textdistance/textdistance/algorithms/phonetic.py
imports: from __future__ import annotations
  from collections import defaultdict
  from itertools import groupby, zip_longest
  from typing import Any, Iterator, Sequence, TypeVar
  from .base import Base, BaseSimilarity
label_desc: Use image node_id 2 for calling the MRA obj's underlying member method code with example usage: obj._calc_mra(word) and returns: word, word, unknown