MEDLINE N-Gram Set

The MEDLINE N-gram Set 2023: by Split, Group, Filter, and Combine Algorithm

The MEDLINE n-gram set (generated by split, group, filter, and combine algorithm) is listed as bellows. For each MEDLINE record, title and abstract are used as the source of n-grams. They are combined, tokenized into sentences, and then tokenized into tokens (words use space as word boundary). Finally, n-grams are generated by filtering out terms with more than 50 characters or the total word count is less than 30. The specifications of generating these n-grams are listed as follows:

  • MEDLINE: 2023 - TI and AB (from MEDLINE Baseline Repository - MBR, pubmed23nXXXX.xml -> PmidTiAbS23nXXXX.txt: 1 ~ 1166)
  • Method: Split, Combine, Filter Algorithm
  • Max. Character Size: 50
  • Min. word count: 30
  • Min. document count: 1

  • Total document count: 34,960,700
  • Total sentence count: 238,939,832
  • Total token count: 5,001,000,732

  • N-gram files
    • File format - 3 fields:
      Document countWord countN-gram
    • Sorted by document count, word count, then alphabetic order of n-grams. N-gram set is not sorted. It can be sorted by nGramUtil package.

  • Download:
    N-gramsFileZip SizeActual SizeNo. of n-grams
    Unigrams1-gram.2023.tgz8.8 MB22 MB1,311,936
    Bigrams2-gram.2023.tgz58 MB170 MB7,943,407
    Trigrams3-gram.2023.tgz92 MB303 MB11,773,385
    Four-grams4-gram.2023.tgz67 MB234 MB7,677,188
    Five-grams5-gram.2023.tgz34 MB121 MB3,401,145
    N-gram SetnGramSet.2023.30.tgz258 MB848 MB32,107,061
    Distilled N-gram SetdistilledNGram.2023.tgz104 MB338 MB12,779,900