MEDLINE N-Gram Set

The MEDLINE N-gram Set 2020: 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: 2020 - TI and AB (from MEDLINE Baseline Repository - MBR, pubmed20nXXXX.xml -> PmidTiAbS20nXXXX.txt: 1 ~ 1015)
  • Method: Split, Combine, Filter Algorithm
  • Max. Character Size: 50
  • Min. word count: 30
  • Min. document count: 1

  • Total document count: 30,420,660
  • Total sentence count: 196,566,513
  • Total token count: 4,080,670,967

  • 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.2020.tgz7.6 MB19 MB1,126,766
    Bigrams2-gram.2020.tgz49 MB143 MB6,702,698
    Trigrams3-gram.2020.tgz75 MB248 MB9,677,700
    Four-grams4-gram.2020.tgz54 MB187 MB6,154,320
    Five-grams5-gram.2020.tgz26 MB94 MB2,649,324
    N-gram SetnGramSet.2020.30.tgz210 MB689 MB26,310,808
    Distilled N-gram SetdistilledNGram.2020.tgz84 MB271 MB10,354,021