Skip to content

Commit

Permalink
Merge pull request #12 from nlytx/develop
Browse files Browse the repository at this point in the history
factorie-nlp-api-10 DocumentBuilder is running more than the chose pipeline
  • Loading branch information
andrewresearch authored Nov 2, 2017
2 parents c3dc78a + 1212abf commit 919e66b
Show file tree
Hide file tree
Showing 10 changed files with 183 additions and 146 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ language: scala
jdk: oraclejdk8

scala:
- 2.12.4
- 2.12.3

script:
- sbt ++$TRAVIS_SCALA_VERSION -J-Xmx6G test
- sbt ++$TRAVIS_SCALA_VERSION -J-Xmx2000m test

# Use container-based infrastructure
sudo: false
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/nlytx/factorie-nlp-api.svg?branch=master)](https://travis-ci.org/nlytx/factorie-nlp-api) ![scalaVersion](https://img.shields.io/badge/scala-2.12.4-blue.svg) ![license](https://img.shields.io/badge/license-Apache%202-blue.svg) [ ![Download](https://api.bintray.com/packages/nlytx-io/factorie-nlp-api/factorie-nlp-api/images/download.svg?version=0.3) ](https://bintray.com/nlytx-io/factorie-nlp-api/factorie-nlp-api/0.3/link)
[![Build Status](https://travis-ci.org/nlytx/factorie-nlp-api.svg?branch=master)](https://travis-ci.org/nlytx/factorie-nlp-api) ![scalaVersion](https://img.shields.io/badge/scala-2.12.4-blue.svg) ![license](https://img.shields.io/badge/license-Apache%202-blue.svg) [ ![Download](https://api.bintray.com/packages/nlytx-io/factorie-nlp-api/factorie-nlp-api/images/download.svg?version=0.5.0) ](https://bintray.com/nlytx-io/factorie-nlp-api/factorie-nlp-api/0.5.0/link)

# factorie-nlp-api

Expand Down
23 changes: 13 additions & 10 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name := "factorie-nlp-api"

version := "0.3"
version := "0.5.1"

scalaVersion := "2.12.4"
scalaVersion := "2.12.3"

organization := "io.nlytx"

val scalaLangV = "2.12.4"
val scalaLangV = "2.12.3"
val scalaParserV = "1.0.6"
val jblasV = "1.2.4"
val apacheComsCompressV = "1.15"
Expand All @@ -22,18 +22,22 @@ val scalaLangDeps = Seq(

val scalaDeps = Seq(
"com.typesafe.akka" %% "akka-stream" % akkaStreamV,
"com.typesafe.akka" %% "akka-slf4j" % akkaStreamV,
"org.json4s" %% "json4s-jackson" % "3.5.3",
"cc.factorie.app.nlp" % "all-models" % factorieV
"cc.factorie.app.nlp" % "all-models" % factorieV
)

val javaDeps = Seq(
"org.jblas" % "jblas" % jblasV,
"org.apache.commons" % "commons-compress" % apacheComsCompressV,
"org.apache.commons" % "commons-lang3" % apacheComsLangV
"org.apache.commons" % "commons-lang3" % apacheComsLangV,
"ch.qos.logback" % "logback-classic" % "1.2.3"
)

libraryDependencies ++= (scalaLangDeps ++ scalaDeps ++ javaDeps)

resolvers += "IESL Release" at "http://dev-iesl.cs.umass.edu/nexus/content/groups/public"

//"junit" % "junit" % "4.12",
//"org.scalatest" %% "scalatest" % "3.0.4" % Test,
//"org.slf4j" % "slf4j-log4j12" % "1.7.25" % Test,
Expand All @@ -50,17 +54,16 @@ libraryDependencies ++= (scalaLangDeps ++ scalaDeps ++ javaDeps)
enablePlugins(JavaAppPackaging) // sbt universal:packageZipTarball
//dockerExposedPorts := Seq(9000) // sbt docker:publishLocal

javaOptions in Universal ++= Seq(
//javaOptions in Universal ++= Seq(
// -J params will be added as jvm parameters
"-J-Xmx6g",
"-J-Xms3g"
//"-J-Xmx6g",
//"-J-Xms3g"

// others will be added as app parameters
// "-Dproperty=true",
// "-port=8080",

// you can access any build setting/task here
//s"-version=${version.value}"
)
//)

resolvers += "IESL Release" at "http://dev-iesl.cs.umass.edu/nexus/content/groups/public"
6 changes: 6 additions & 0 deletions src/main/resources/application.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
akka {
loglevel = "DEBUG"
loggers = ["akka.event.slf4j.Slf4jLogger"]
logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
logger-startup-timeout=30s
}
14 changes: 14 additions & 0 deletions src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<configuration debug="false">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%green(%date{yyyyMMdd_HH:mm:ss.SSS, Australia/Sydney}) %highlight(%-5level) %cyan(%logger{36}) %yellow(%X{akkaSource}) - %msg%n</pattern>
</encoder>
</appender>
<logger name="com.zaxxer.hikari.pool.HikariPool" level="INFO" />
<logger name="slick.compiler" level="INFO" />

<root level="DEBUG">
<appender-ref ref="STDOUT" />
</root>
</configuration>
3 changes: 3 additions & 0 deletions src/main/scala/cc/factorie/app/nlp/DocumentAnnotator.scala
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
package cc.factorie.app.nlp

import akka.event.jul.Logger
import cc.factorie.app.nlp.coref.Mention
import cc.factorie.app.nlp.phrase.Phrase
import cc.factorie.util.Threading

trait DocumentAnnotator {


def process(document: Document): Document // NOTE: this method may mutate and return the same document that was passed in
def prereqAttrs: Iterable[Class[_]]
def postAttrs: Iterable[Class[_]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cc.factorie.app.nlp.segment
import java.io.StringReader

import cc.factorie.app.nlp.{Document, DocumentAnnotator, Token}
import cc.factorie.app.nlp.segment.EnglishLexer



Expand Down
132 changes: 0 additions & 132 deletions src/main/scala/io/nlytx/factorie/nlp/api/DocumentBuilder.scala

This file was deleted.

Loading

0 comments on commit 919e66b

Please sign in to comment.