https://github.com/kermitt2/grobid-ner
Raw File
Tip revision: 8cdf0e5351500cf681220cd11f7f3d9f3f923f16 authored by lopez on 17 June 2020, 00:34:39 UTC
minor doc changes
Tip revision: 8cdf0e5
pom.xml.bak
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>org.grobid</groupId>
    <artifactId>grobid-ner</artifactId>
    <version>0.6.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <name>${project.artifactId}</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <assemblies.name>src/main/assembly/assembly.xml</assemblies.name>
        <package.file>${project.groupId}.${project.artifactId}_${project.version}.war</package.file>
        <license.file>${basedir}/LICENSE</license.file>
    </properties>

    <scm>
        <developerConnection>scm:git:git@github.com:kermitt2/grobid-ner.git</developerConnection>
      <tag>HEAD</tag>
  </scm>

    <repositories>
        <repository>
            <id>3rd-party-local-repo</id>
            <name>This is a local repository included in the grobid project, to access 3rd party libs.</name>
            <url>file:///${basedir}/lib/</url>
            <layout>default</layout>
        </repository>
        <repository>
            <id>maven2-repository.dev.java.net</id>
            <name>Java.net Repository for Maven</name>
            <url>http://download.java.net/maven/2/</url>
            <layout>default</layout>
        </repository>
        <repository>
            <id>bintray-rookies-maven</id>
            <name>bintray</name>
            <url>https://dl.bintray.com/rookies/maven</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <distributionManagement>
            <repository>
                <id>bintray-lfoppiano-maven</id>
                <name>lfoppiano-maven</name>
                <url>https://api.bintray.com/maven/rookies/maven/grobid-ner/;publish=1</url>
            </repository>
    </distributionManagement>

    <dependencies>
        <!-- GROBID -->
        <dependency>
            <groupId>org.grobid</groupId>
            <artifactId>grobid-core</artifactId>
            <version>0.6.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.grobid</groupId>
            <artifactId>grobid-trainer</artifactId>
            <version>0.6.0-SNAPSHOT</version>
        </dependency>

        <!-- TEST -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>

        <!-- commons -->
        <!-- for pooling e.g. Engine -->
        <dependency>
            <groupId>commons-pool</groupId>
            <artifactId>commons-pool</artifactId>
            <version>1.6</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.5</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
            <version>4.1</version>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.25</version>
        </dependency>

        <!-- XML parsing -->
        <dependency>
            <groupId>org.codehaus.woodstox</groupId>
            <artifactId>stax2-api</artifactId>
            <version>3.1.4</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.woodstox</groupId>
            <artifactId>woodstox-core-asl</artifactId>
            <version>4.4.0</version>
        </dependency>

        <!-- TBD: update to the latest NLP4J! -->
        <dependency>
            <groupId>com.googlecode.clearnlp</groupId>
            <artifactId>clearnlp</artifactId>
            <version>1.3.1</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.jolira</groupId>
                <artifactId>onejar-maven-plugin</artifactId>
                <version>1.4.4</version>
                <executions>
                    <execution>
                        <configuration>
                            <mainClass>org.grobid.core.main.batch.NERMain</mainClass>
                            <onejarVersion>0.97</onejarVersion>
                            <attachToBuild>true</attachToBuild>
                            <classifier>onejar</classifier>
                        </configuration>
                        <goals>
                            <goal>one-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
            </plugin>

            <!--plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptors>
                        <descriptor>${assemblies.name}</descriptor>
                    </descriptors>
                    <appendAssemblyId>false</appendAssemblyId>
                    <finalName>${project.groupId}.${project.artifactId}_${project.version}</finalName>
                    <outputDirectory>target/distribution</outputDirectory>
                    <workDirectory>target/assembly/work</workDirectory>
                </configuration>
            </plugin-->

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.20</version>
                <configuration>
                    <forkMode>pertest</forkMode>
                    <argLine>-Xms256m -Xmx1024m</argLine>
                    <testFailureIgnore>false</testFailureIgnore>
                    <skip>false</skip>
                    <systemPropertyVariables>
                        <log4j.configuration>log4j.xml</log4j.configuration>
                    </systemPropertyVariables>
                    <excludes>
                        <exclude>**/*IntegrationTest.java</exclude>
                    </excludes>
                    <!--argLine>-Djava.library.path=${basedir}/lib/</argLine> <systemProperties>
                        <property> <name>java.library.path</name> <value>lib/</value> </property>
                        </systemProperties -->
                </configuration>
            </plugin>
        </plugins>
        <!--/pluginManagement -->
    </build>

    <profiles>

        <profile>
            <id>train_nerfr</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.1.1</version>
                        <executions>
                            <execution>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>java</goal>
                                </goals>
                                <configuration>
                                    <mainClass>org.grobid.trainer.NERFrenchTrainer</mainClass>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- mvn generate-resources -Ptrain_nersense -e -->
        <profile>
            <id>train_nersense</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.1.1</version>
                        <executions>
                            <execution>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>java</goal>
                                </goals>
                                <configuration>
                                    <mainClass>org.grobid.trainer.SenseTrainer</mainClass>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- mvn compile exec:exec -Peval_conll -->
        <profile>
            <id>eval_conll</id>
            <activation>
                <property>
                    <name>eval_conll</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <configuration>
                            <executable>java</executable>
                            <arguments>
                                <argument>-classpath</argument>
                                <classpath />
                                <argument>org.grobid.trainer.NEREvaluation</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- mvn compile exec:exec -Ptrain_conll -->
        <profile>
            <id>train_conll</id>
            <activation>
                <property>
                    <name>train_conll</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <configuration>
                            <executable>java</executable>
                            <arguments>
                                <argument>-classpath</argument>
                                <classpath />
                                <argument>org.grobid.trainer.CoNNLNERTrainer</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- mvn compile exec:exec -Ptrain_assemble_conll -->
        <profile>
            <id>train_assemble_conll</id>
            <activation>
                <property>
                    <name>train_assemble_conll</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <configuration>
                            <executable>java</executable>
                            <arguments>
                                <argument>-classpath</argument>
                                <classpath />
                                <argument>org.grobid.trainer.AssembleNERCorpus</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- mvn compile exec:exec -Ptrain_eval_ner -->
        <profile>
            <id>train_eval_ner</id>
            <activation>
                <property>
                    <name>train_eval_ner</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <configuration>
                            <executable>java</executable>
                            <arguments>
                                <argument>-classpath</argument>
                                <classpath />
                                <argument>org.grobid.trainer.NERTrainerRunner</argument>
                                <argument>2</argument>
                                <argument>ner</argument>
                                <argument>-gH</argument>
                                <argument>../grobid-home</argument>
                                <argument>-s</argument>
                                <argument>0.8</argument> <!-- to be changed for another ratio of training/evaluation segmentation -->
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- mvn compile exec:exec -Ptrain_ner -->
        <profile>
            <id>train_ner</id>
            <activation>
                <property>
                    <name>train_ner</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <configuration>
                            <executable>java</executable>
                            <arguments>
                                <argument>-classpath</argument>
                                <classpath />
                                <argument>org.grobid.trainer.NERTrainerRunner</argument>
                                <argument>0</argument>
                                <argument>ner</argument>
                                <argument>-gH</argument>
                                <argument>../grobid-home</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- mvn compile exec:exec -Peval_ner -->
        <profile>
            <id>eval_ner</id>
            <activation>
                <property>
                    <name>eval_ner</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <configuration>
                            <executable>java</executable>
                            <arguments>
                                <argument>-classpath</argument>
                                <classpath />
                                <argument>org.grobid.trainer.NERTrainerRunner</argument>
                                <argument>1</argument>
                                <argument>ner</argument>
                                <argument>-gH</argument>
                                <argument>../grobid-home</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- mvn compile exec:exec -Ptrain_eval_nerfr -->
        <profile>
            <id>train_eval_nerfr</id>
            <activation>
                <property>
                    <name>train_eval_nerfr</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <configuration>
                            <executable>java</executable>
                            <arguments>
                                <argument>-classpath</argument>
                                <classpath />
                                <argument>org.grobid.trainer.NERTrainerRunner</argument>
                                <argument>2</argument>
                                <argument>nerfr</argument>
                                <argument>-gH</argument>
                                <argument>../grobid-home</argument>
                                <argument>-s</argument>
                                <argument>0.8</argument> <!-- to be changed for another number of folds -->
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- mvn compile exec:exec -Ptrain_eval_nfold_ner -->
        <profile>
            <id>train_eval_nfold_ner</id>
            <activation>
                <property>
                    <name>train_eval_nfold_ner</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <configuration>
                            <executable>java</executable>
                            <arguments>
                                <argument>-classpath</argument>
                                <classpath />
                                <argument>org.grobid.trainer.NERTrainerRunner</argument>
                                <argument>3</argument>
                                <argument>ner</argument>
                                <argument>-gH</argument>
                                <argument>../grobid-home</argument>
                                <argument>-n</argument>
                                <argument>10</argument> <!-- to be changed for another number of folds -->
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- mvn compile exec:exec -Ptrain_eval_nfold_nerfr -->
        <profile>
            <id>train_eval_nfold_nerfr</id>
            <activation>
                <property>
                    <name>train_eval_nfold_nerfr</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <configuration>
                            <executable>java</executable>
                            <arguments>
                                <argument>-classpath</argument>
                                <classpath />
                                <argument>org.grobid.trainer.NERTrainerRunner</argument>
                                <argument>3</argument>
                                <argument>nerfr</argument>
                                <argument>-gH</argument>
                                <argument>../grobid-home</argument>
                                <argument>-n</argument>
                                <argument>10</argument> <!-- to be changed for another ratio of training/evaluation segmentation -->
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- mvn compile exec:exec -Peval_nerfr -->
        <profile>
            <id>eval_nerfr</id>
            <activation>
                <property>
                    <name>eval_nerfr</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <configuration>
                            <executable>java</executable>
                            <arguments>
                                <argument>-classpath</argument>
                                <classpath />
                                <argument>org.grobid.trainer.NERTrainerRunner</argument>
                                <argument>1</argument>
                                <argument>nerfr</argument>
                                <argument>-gH</argument>
                                <argument>../grobid-home</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
back to top