Retrieve words from MedDict Database from pattern

GET /words

Get results of word from input, which included the definitions, illustration, etc. The pattern follows the following Regular Expression

import re 
pattern = f"^.*{pattern}.*$"

Which means it will match any word that INCLUDES the pattern.

Query parameters

  • lang string Required

    Source language to search the pattern on.

    Values are en or vn.

  • word string Required

    The pattern to search for.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • id integer
    • en string
    • en_type string
    • vn string
    • vn_type string
  • 400

    The request is not following the convention.

GET /words
curl \
 -X GET http://localhost:5000/words?lang=en&word=abdominal
Response examples (200)
[
  {
    "en": "abdominal pressure",
    "en_type": "n",
    "id": 8,
    "vn": "áp lực khoang bụng",
    "vn_type": "danh từ"
  },
  {
    "en": "abdominal aorta",
    "en_type": "n",
    "id": 1,
    "vn": "động mạch chủ bụng",
    "vn_type": "danh từ"
  },
  {
    "en": "abdominal aortic aneurysm",
    "en_type": "n",
    "id": 2,
    "vn": "phình động mạch chủ bụng",
    "vn_type": "danh từ"
  },
  {
    "en": "abdominal cavity",
    "en_type": "n",
    "id": 3,
    "vn": "khoang ổ bụng",
    "vn_type": "danh từ"
  },
  {
    "en": "abdominal decompression",
    "en_type": "n",
    "id": 4,
    "vn": "giải áp khoang bụng",
    "vn_type": "danh từ"
  },
  {
    "en": "abdominal esophagus",
    "en_type": "n",
    "id": 5,
    "vn": "thực quản vùng bụng",
    "vn_type": "danh từ"
  },
  {
    "en": "abdominal peritoneum",
    "en_type": "n",
    "id": 7,
    "vn": "phúc mạc bụng",
    "vn_type": "danh từ"
  },
  {
    "en": "abdominal paracentesis",
    "en_type": "n",
    "id": 6,
    "vn": "chọc dò ổ bụng",
    "vn_type": "danh từ"
  },
  {
    "en": "extra-abdominal",
    "en_type": "a",
    "id": 2452,
    "vn": "ngoài bụng",
    "vn_type": "tính từ"
  },
  {
    "en": "intra-abdominal abscess",
    "en_type": "n",
    "id": 5515,
    "vn": "áp-xe bụng trong bụng",
    "vn_type": "danh từ"
  },
  {
    "en": "tuboabdominal pregnancy",
    "en_type": "n",
    "id": 8727,
    "vn": "mang thai lạc vị vòi tử cung-ổ bụng",
    "vn_type": "danh từ"
  }
]