aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-misc')
-rw-r--r--sci-misc/stanford-tagger/Manifest2
-rw-r--r--sci-misc/stanford-tagger/stanford-tagger-4.2.0.ebuild (renamed from sci-misc/stanford-tagger/stanford-tagger-20060521.ebuild)44
2 files changed, 22 insertions, 24 deletions
diff --git a/sci-misc/stanford-tagger/Manifest b/sci-misc/stanford-tagger/Manifest
index d35aa5bb6..4099c1d16 100644
--- a/sci-misc/stanford-tagger/Manifest
+++ b/sci-misc/stanford-tagger/Manifest
@@ -1 +1 @@
-DIST postagger-2006-05-21.tar.gz 10722420 BLAKE2B eada87ca6282d0d4d7a3601d0a694c723e888a0385baff2e55848749b238e58fe180c12a2ad5768604d5b6ed65a348d12629d934b7d52e32ab052c1d9c543c45 SHA512 ff54d13367b1402144ea36e0e42a98817fe8ac8ce47a1114c51fecf03e203b1fdcf048a15692688796978992c71eb0c35d76b66f5a07c749e1c3a7f99174caca
+DIST stanford-tagger-4.2.0.zip 78034596 BLAKE2B 63fd2f62644b430e47dd8a9f455a00a95c81304954cc8dc7ba4fffa22584fa340509fe5d504251e205cf94ed0bfce20b57470d873dfd05a4c28bcfd15a630d24 SHA512 56c2c12f71d39338052a80c1b7e63e232847df4d9aac1211d6ea5afddebe1689ab6314f3097278af1058f9f07332b243da75ad8b61301db12b7eb087c13452bc
diff --git a/sci-misc/stanford-tagger/stanford-tagger-20060521.ebuild b/sci-misc/stanford-tagger/stanford-tagger-4.2.0.ebuild
index a844dd05c..f3e5339dd 100644
--- a/sci-misc/stanford-tagger/stanford-tagger-20060521.ebuild
+++ b/sci-misc/stanford-tagger/stanford-tagger-4.2.0.ebuild
@@ -1,59 +1,57 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
JAVA_PKG_IUSE="doc source"
+
inherit java-pkg-2
-MY_PV=2006-05-21
-MY_P=postagger-${MY_PV}
+MY_PN=stanford-postagger
+MY_P="${MY_PN}-${PV}"
+DATE="2020-11-17"
+
DESCRIPTION="Stanfords log linear POS taggers"
HOMEPAGE="http://nlp.stanford.edu/software/tagger.shtml"
-SRC_URI="http://nlp.stanford.edu/software/${MY_P}.tar.gz"
+SRC_URI="http://nlp.stanford.edu/software/${P}.zip"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~x86"
-IUSE="${IUSE}"
+KEYWORDS="~amd64 ~x86"
COMMON_DEP=""
-DEPEND=">=virtual/jdk-1.5
+DEPEND=">=virtual/jdk-1.7
${COMMON_DEP}"
-RDEPEND=">=virtual/jre-1.5
+RDEPEND=">=virtual/jre-1.7
${COMMON_DEP}"
+BDEPEND="app-arch/unzip"
-S="${WORKDIR}/${MY_P}"
+S="${WORKDIR}/${MY_PN}-full-${DATE}"
src_prepare() {
- jar xf ${MY_P}-source.jar
- rm -v ${MY_P}.jar || die
+ mkdir -p src || die
+ pushd src || die
+ jar xf ../${MY_P}-sources.jar || die
sed \
-e 's/import edu.stanford.nlp.ling.IndexedFeatureLabe/\/\/\0/g' \
-i edu/stanford/nlp/stats/Counters.java || die "sed failed"
sed \
-e 's/import edu.stanford.nlp.sequences.BeamBestSequenceFinder/\/\/\0/g' \
-i edu/stanford/nlp/tagger/maxent/TestSentence.java || die "sed failed"
-}
-
-src_compile() {
- ejavac `find edu -name *.java` || die "ejavac failed"
- find edu -name '*.class' -o -name '*.properties' | \
- xargs jar cf "${S}/${PN}.jar" || die "jar failed"
+ popd || die
+ rm -v ${MY_P}.jar || die
+ default
}
src_install() {
- java-pkg_dojar ${PN}.jar
+ java-pkg_newjar ${MY_PN}.jar ${PN}.jar
insinto /usr/share/${PN}/wsj3t0-18-bidirectional
- doins wsj3t0-18-bidirectional/*
- insinto /usr/share/${PN}/wsj3t0-18-left3words
- doins wsj3t0-18-left3words/*
if use doc ; then
java-pkg_dojavadoc javadoc
fi
if use source ; then
- java-pkg_dosrc edu
+ java-pkg_dosrc src
fi
java-pkg_dolauncher stanford-postagger --java_args -Xmx300m --main edu.stanford.nlp.tagger.maxent.MaxentTagger
java-pkg_dolauncher stanford-postrainer --main edu.stanford.nlp.tagger.maxent.Train