Installing MetaMap on CentOS 6.4

由於工作要做text mining去取得UML's CONCEPT_ID,因此就將安裝的過程記錄下來

請至MetaMap網頁下載public_mm_linux_main_2013v2.tar.gz
自行解壓縮
# tar -zxvf public_mm_linux_main_2013v2.tar.gz

進入主目錄
# cd public_mm


# ./bin/install.sh
Enter basedir of installation [/home/ben/public_mm]
/home/ben/public_mm
Basedir is set to /home/ben/public_mm.


The WSD Server requires Sun's Java Runtime Environment (JRE);
Sun's Java Developer Kit (JDK) will work as well. if the
command: "which" java returns /usr/local/jre1.4.2/bin/java, then the
JRE resides in /usr/local/jre1.4.2/.


Where does your distribution of Sun\'s JRE reside?
Enter home path of JRE (JDK) [/usr/java/jdk1.7.0_45]:
/usr/java/jdk1.7.0_45
Using /usr/java/jdk1.7.0_45 for JAVA_HOME.


PS. 藍色字為安裝過程自行輸入的部分


啟用MetaMap Server
# ./bin/skrmedpostctl start
# ./bin/wsdserverctl start


測試MetaMap
# echo "lung cancer" | ./bin/metamap13 -I
/home/ben/public_mm/bin/SKRrun.13 /home/ben/public_mm/bin/metamap13.BINARY.Linux -L 2013 --lexicon db -Z 2013AB -I
libgcc_s.so.1 must be installed for pthread_cancel to work
/home/ben/public_mm/bin/metamap2013.TEMPLATE: line 135: 23683 Aborted                 (core dumped) $COMMAND
出現錯誤訊息


安裝libgcc_s.so.1
# yum provides */libgcc_s.so.1
# yum install libgcc.i686


重啟Server,先關閉,在啟用
# ./bin/skrmedpostctl stop
# ./bin/wsdserverctl stop
# ./bin/skrmedpostctl start
# ./bin/wsdserverctl start


測試MetaMap
# echo "lung cancer" | ./bin/metamap13 -I


metamap13.BINARY.Linux (2013)


Control options:
 composite_phrases=4
 lexicon_year=2013
 lexicon=db
 mm_data_year=2013AB
 show_cuis
Processing 00000000.tx.1: lung cancer


Phrase: "lung cancer"
Meta Candidates (Total=11; Excluded=3; Pruned=0; Remaining=8)
 1000   C0242379:Lung Cancer (Malignant neoplasm of lung) [Neoplastic Process]
 1000   C0684249:LUNG CANCER (Carcinoma of lung) [Neoplastic Process]
  861   C0006826:Cancer (Malignant Neoplasms) [Neoplastic Process]
  861   C0024109:Lung [Body Part, Organ, or Organ Component]
  861   C0819757:LUNG (Structure of parenchyma of lung) [Tissue]
  861   C0998265:Cancer (Cancer Genus) [Eukaryote]
  861   C1278908:Lung (Entire lung) [Body Part, Organ, or Organ Component]
  861   C1306459:Cancer (Primary malignant neoplasm) [Finding]
  805 E C2707265:Pulmonary (Pulmonary:-:Point in time:^Patient:-) [Clinical Attribute]
  805 E C2709248:Pulmonary (Pulmonary (qualifier value)) [Qualitative Concept]
  768 E C0032285:Pneumonia [Disease or Syndrome]
Meta Mapping (1000):
 1000   C0684249:LUNG CANCER (Carcinoma of lung) [Neoplastic Process]
Meta Mapping (1000):
 1000   C0242379:Lung Cancer (Malignant neoplasm of lung) [Neoplastic Process]


測試OK~

留言

  1. 您好
    請問您當時有安裝MetaMap JAVA API嗎?
    照著您的紀錄順利完成了main download的安裝
    對於MetaMap JAVA API卻還是一點辦法也沒有......

    回覆刪除
  2. 抱歉! 當時應該沒有安裝JAVA API! 目前也已沒有測試環境了,所以沒辦法幫您try! 但我建議您依照錯誤訊息,去看一下有缺什麼東西~ 也許,可以解決!

    回覆刪除

張貼留言