source: trunk/dports/textproc/jdepp/Portfile @ 132709

Last change on this file since 132709 was 132709, checked in by hum@…, 5 years ago

jdepp: update to 2015-02-08

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.4 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 132709 2015-02-08 15:39:40Z hum@macports.org $
3
4PortSystem          1.0
5
6name                jdepp
7version             2015-02-08
8categories          textproc japanese
9maintainers         hum openmaintainer
10
11description         C++ implementation of Japanese Dependency Parsers
12
13long_description    J.DepP is a C++ implementation of Japanese dependency \
14                    parsing algorithms. The parser takes a raw sentence as input \
15                    and performs word segmentation, POS tagging (thanks to MeCab), \
16                    bunsetsu chunking and dependency parsing. J.DepP is meant \
17                    for those who want to parse massive texts (e.g., entire blog \
18                    feeds) efficiently with state-of-the-art parsing accuracy.
19
20homepage            http://www.tkl.iis.u-tokyo.ac.jp/~ynaga/jdepp/
21platforms           darwin
22license             {GPL-2 LGPL-2.1}
23
24master_sites        ${homepage}
25checksums           ${distname}${extract.suffix} \
26                    rmd160  845584ae822b4ddb0bb439765be7714a97be0ed8 \
27                    sha256  55a1a99b6645c4e01126f931fd72bf308dde96df8319f09e1c7cb9cd1ffdae7f
28
29depends_lib         port:mecab-base \
30                    port:mecab-jumandic-utf8
31
32patchfiles          patch-configure.diff
33
34post-patch {
35    reinplace "s|KNBC_CORPUS_DIR=\${PWD}/KNBC_v1.0_090925|KNBC_CORPUS_DIR=${prefix}/share/KNBC|" \
36        ${worksrcpath}/configure
37}
38
39configure.args      --enable-standalone
40
41variant knbc conflicts kyoto kyoto_partial description {Train a parser wht KNBC (Kyoto-University and NTT Blog Corpus)} {
42    depends_build-append  port:KNBC
43
44    configure.args-append --with-corpus=knbc
45
46    build.target          model
47    build.args-append     CORPUS_DIR=${prefix}/share/KNBC
48}
49
50variant kyoto_partial conflicts kyoto knbc description {Train a parser with Kyoto-University Text Corpus annotation without Mainichi news articles} {
51    set kyoto_corpus      KyotoCorpus4.0
52    set corpus_distfile   ${kyoto_corpus}${extract.suffix}
53    distfiles-append      ${corpus_distfile}:corpus
54    master_sites-append   http://nlp.ist.i.kyoto-u.ac.jp/nl-resource/corpus/:corpus
55    checksums-append      ${corpus_distfile} \
56                          rmd160  9c8212d939b7112a79aff30ab0880f94c3ee9b48 \
57                          sha256  6fe4f7bac19e192f7545c4de0c765f690a524c7611191e2af9be031d4923871f
58
59    configure.args-append --with-corpus=kyoto-partial \
60                          --enable-autopos-train=no
61
62    build.target          model
63    build.args-append     CORPUS_DIR=${workpath}/${kyoto_corpus}
64}
65
66# To use the complete kyoto corpus with +kyoto variant, users must put their data into the following directory.
67set kyoto_dir       /tmp/KyotoCorpus4.0
68
69variant kyoto conflicts kyoto_partial knbc description {Train a parser with Kyoto-University Text Corpus} {
70    if {[file exists ${kyoto_dir}]} {
71        build.target          model
72        build.args-append     CORPUS_DIR=${kyoto_dir}
73    } else {
74        pre-fetch {
75            ui_error "To train a parser with Kyoto Corpus, please put the files in ${kyoto_dir}"
76            return -code error "Kyoto Corpus is not available at ${kyoto_dir}"
77        }
78    }
79}
80
81variant ipadic conflicts naistjdic unidic description {Build a parser with auto POSs given by MeCab/ipadic} {
82    depends_lib-delete    port:mecab-jumandic-utf8
83    depends_lib-append    port:mecab-ipadic-utf8
84
85    configure.args-append --with-mecab-dict=IPA
86}
87
88variant naistjdic conflicts ipadic unidic description {Build a parser with auto POSs given by MeCab/NAIST-jdic} {
89    depends_lib-delete    port:mecab-jumandic-utf8
90    depends_lib-append    port:mecab-naist-jdic-utf8
91
92    configure.args-append --with-mecab-dict=NAIST-J
93}
94
95variant unidic conflicts ipadic naistjdic description {Build a parser with auto POSs given by MeCab/UNIdic} {
96    depends_lib-delete    port:mecab-jumandic-utf8
97    depends_lib-append    port:unidic-mecab
98
99    configure.args-append --with-mecab-dict=UNI
100}
101
102if {![variant_isset kyoto] && ![variant_isset kyoto_partial]} {
103    default_variants +knbc
104}
105
106post-destroot {
107    set docdir ${prefix}/share/doc/${name}
108    xinstall -d ${destroot}${docdir}
109    xinstall -m 644 -W ${worksrcpath} \
110        AUTHORS COPYING GPL LGPL README THANKS \
111        ${destroot}${docdir}
112}
113
114livecheck.type      regex
115livecheck.regex     "${name}-(\\d+(?:\\-\\d+)*)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.