美文网首页
metemaplite安装报错解决

metemaplite安装报错解决

作者: jiarf | 来源:发表于2021-02-20 09:20 被阅读0次

    年假结束,第一件事情就是之前的metemap已经下载好了,三个安装包(需要提前注册时间长,才能下载到这三个安装包)

    image.png
    跟着教程进行安装时,https://metamap.nlm.nih.gov/MetaMapLite.shtml
    image.png
    最后一句怎么都不成功
    14:53:09 jiarongf@172.16.10.223:/data1/jiarongf/Knowledge_Graph/metamap/metamap_bag/bag/public_mm_lite
    $
    ./metamaplite.sh --indexdir=data/ivf/2020AA/Base file
    ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
    Exception in thread "main" java.io.FileNotFoundException: file (No such file or directory)
            at java.io.FileInputStream.open0(Native Method)
            at java.io.FileInputStream.open(FileInputStream.java:195)
            at java.io.FileInputStream.<init>(FileInputStream.java:138)
            at gov.nih.nlm.nls.metamap.document.FreeText.loadFile(FreeText.java:73)
            at gov.nih.nlm.nls.metamap.document.FreeText.loadFreeTextFile(FreeText.java:137)
            at gov.nih.nlm.nls.metamap.document.FreeText.loadFileAsBioCDocumentList(FreeText.java:157)
            at gov.nih.nlm.nls.ner.MetaMapLite.main(MetaMapLite.java:1536)
    
    

    一直报错,看到前面的官网说需要jdk1.8:To run MetaMapLite, you will need the Java Runtime Environment (JRE). We have tested MetaMapLite with JRE 1.8. The JRE is available from: http://www.java.com,所以我把java版本降到8,还是不行,依旧报错,
    这是因为有文件找不到,于是打开metamaplite.sh一个一个的找,发现其中的dir数据集的目录是AA的data/ivf/2020AA/USAbase,直接换掉data/ivf/2020AA/Base file,也不知道行不行,
    安装完man在运行这个./metamaplite.sh --indexdir=data/ivf/2020AA/Base file,还是报错

    15:26:38 jiarongf@172.16.10.223:/data1/jiarongf/Knowledge_Graph/metamap/metamap_bag/bag/public_mm_lite
    $
    ./metamaplite.sh --indexdir=data/ivf/2020AA/Base file
    ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
    Exception in thread "main" java.io.FileNotFoundException: file (No such file or directory)
            at java.io.FileInputStream.open0(Native Method)
            at java.io.FileInputStream.open(FileInputStream.java:195)
            at java.io.FileInputStream.<init>(FileInputStream.java:138)
            at gov.nih.nlm.nls.metamap.document.FreeText.loadFile(FreeText.java:73)
            at gov.nih.nlm.nls.metamap.document.FreeText.loadFreeTextFile(FreeText.java:137)
            at gov.nih.nlm.nls.metamap.document.FreeText.loadFileAsBioCDocumentList(FreeText.java:157)
            at gov.nih.nlm.nls.ner.MetaMapLite.main(MetaMapLite.java:1536)
    15:26:52 jiarongf@172.16.10.223:/data1/jiarongf/Knowledge_Graph/metamap/metamap_bag/bag/public_mm_lite
    

    step2.

    安装main的时候,

    Public MetaMap basedir: /data1/jiarongf/Knowledge_Graph/metamap/metamap_bag/bag/public_mm
    Public MetaMap Program Dir: /data1/jiarongf/Knowledge_Graph/metamap/metamap_bag/bag/public_mm/bin
    Java Home dir: /data1/jiarongf/software/jdl/jdk1.8.0_281
    

    https://metamap.nlm.nih.gov/Installation.shtml
    运行的时候有一个报错

    15:49:32 jiarongf@172.16.10.223:/data1/jiarongf/Knowledge_Graph/metamap/metamap_bag/bag/public_mm
    $
    ./bin/metamap
    /data1/jiarongf/Knowledge_Graph/metamap/metamap_bag/bag/public_mm/bin/SKRrun.20 /data1/jiarongf/Knowledge_Graph/metamap/metamap_bag/bag/public_mm/bin/metamap20.BINARY.Linux --lexicon db -Z 2020AA
    Berkeley DB databases (USAbase 2020AA strict model) are open.
    Static variants will come from table varsan in /data1/jiarongf/Knowledge_Graph/metamap/metamap_bag/bag/public_mm/DB/DB.USAbase.2020AA.strict.
    Derivational Variants: Adj/noun ONLY.
    Variant generation mode: static.
    
    ### MetaMap ERROR: Calling socket_client_open for TAGGER Server on host localhost and port 1795:
    error(system_error,system_error(SPIO_E_NET_CONNREFUSED))
    

    解决方法

    15:49:39 jiarongf@172.16.10.223:/data1/jiarongf/Knowledge_Graph/metamap/metamap_bag/bag/public_mm
    $
    ./bin/skrmedpostctl start
    $Starting skrmedpostctl:
    started.
    15:52:36 jiarongf@172.16.10.223:/data1/jiarongf/Knowledge_Graph/metamap/metamap_bag/bag/public_mm
    $
    ./bin/metamap
    /data1/jiarongf/Knowledge_Graph/metamap/metamap_bag/bag/public_mm/bin/SKRrun.20 /data1/jiarongf/Knowledge_Graph/metamap/metamap_bag/bag/public_mm/bin/metamap20.BINARY.Linux --lexicon db -Z 2020AA
    Berkeley DB databases (USAbase 2020AA strict model) are open.
    Static variants will come from table varsan in /data1/jiarongf/Knowledge_Graph/metamap/metamap_bag/bag/public_mm/DB/DB.USAbase.2020AA.strict.
    Derivational Variants: Adj/noun ONLY.
    Variant generation mode: static.
    Established connection $stream(139631136340016) to TAGGER Server on localhost.
    
    metamap (2020)
    
    Control options:
      composite_phrases=4
      lexicon=db
      mm_data_year=2020AA
    |:
    

    简单来说运行一共三步,首先进入/data1/jiarongf/Knowledge_Graph/metamap/metamap_bag/bag/public_mm目录,
    接着运行./bin/skrmedpostctl start
    ./bin/metamap
    ./bin/wsdserverctl stop就可以了

    !!!!另外如果main什么都不输出的话,重新运行一下上面的那三步就可以了

    相关文章

      网友评论

          本文标题:metemaplite安装报错解决

          本文链接:https://www.haomeiwen.com/subject/nqtnxltx.html