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

  • Total document count: 27,837,540
  • Total sentence count: 174,395,209
  • Total token count: 3,585,789,820

  • 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.2018.tgz6.9 MB17 MB1,022,412
    Bigrams2-gram.2018.tgz44 MB128 MB6,000,100
    Trigrams3-gram.2018.tgz66 MB219 MB8,534,524
    Four-grams4-gram.2018.tgz44 MB162 MB5,348,132
    Five-grams5-gram.2018.tgz21 MB80 MB2,265,965
    N-gram SetnGramSet.2018.30.tgz184 MB603 MB23,171,133
    Distilled N-gram SetdistilledNGram.2018.tgz72 MB234 MB8,979,895