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

  • Total document count: 31,850,051
  • Total sentence count: 209,685,517
  • Total token count: 4,365,354,060

  • 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.2021.tgz8 MB20 MB1,185,627
    Bigrams2-gram.2021.tgz52 MB152 MB7,093,113
    Trigrams3-gram.2021.tgz80 MB265 MB10,327,977
    Four-grams4-gram.2021.tgz58 MB201 MB6,620,884
    Five-grams5-gram.2021.tgz29 MB102 MB2,875,651
    N-gram SetnGramSet.2021.30.tgz224 MB738 MB28,103,252
    Distilled N-gram SetdistilledNGram.2021.tgz90 MB292 MB11,127,802