Skip to content

Commit

Permalink
version 1.1.5 there is a pblm with gradle test
Browse files Browse the repository at this point in the history
  • Loading branch information
kariminf committed Jul 28, 2017
1 parent 4bee3b4 commit 89d6710
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 188 deletions.
5 changes: 1 addition & 4 deletions .directory
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[Dolphin]
Timestamp=2017,3,25,19,39,49
Timestamp=2017,7,28,16,28,13
Version=3

[Settings]
HiddenFilesShown=true
111 changes: 59 additions & 52 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ sourceCompatibility = 1.8
targetCompatibility = 1.8

// Release version
version = '1.1.4'
version = '1.1.5'

//TODO this will prevent tests
check.dependsOn.remove(test)

ext.current_Date = getDate()

Expand All @@ -40,30 +43,44 @@ def getDate() {


sourceSets {

basic

basic_main {
compileClasspath += basic.output
}
basic_agpl3 {
compileClasspath += basic.output
}

wordnet

eval {
compileClasspath += basic.output
compileClasspath += basic_main.output
compileClasspath += basic_agpl3.output
compileClasspath += wordnet.output
}

test {
compileClasspath += basic.output
compileClasspath += basic_main.output
compileClasspath += basic_agpl3.output
compileClasspath += wordnet.output
compileClasspath += eval.output
}
wordnet
}

task jarBasicMain(type: Jar) {
baseName = "langpi-basic-main"
from sourceSets.basic_main.output
from sourceSets.basic.output

manifest {

//Jar tasks

def getManifest(specif, implem) {
return {
attributes 'Created-By': System.getProperty('java.version') + ' (' + System.getProperty('java.vendor') + ')',
"Specification-Title" : "Language processing interface: basic main",
"Specification-Title" : specif,
"Specification-Version" : version,
"Specification-Vendor" : "Kariminf",
"Implementation-Title" : "kariminf.langpi.basic-main",
"Implementation-Title" : implem,
"Implementation-Version" : version + "-build" + current_Date ,
"Implementation-Vendor" : "Kariminf",
"Built-With": "gradle-${project.getGradle().getGradleVersion()}, groovy-${GroovySystem.getVersion()}",
Expand All @@ -73,69 +90,46 @@ task jarBasicMain(type: Jar) {
}
}

task jarBasicMain(type: Jar) {
baseName = "langpi-basic-main"
from sourceSets.basic_main.output
from sourceSets.basic.output

manifest getManifest("Language processing interface: basic main", "kariminf.langpi.basic-main")

}

task jarBasicAgpl3(type: Jar) {
baseName = "langpi-basic-agpl3"
from sourceSets.basic_agpl3.output
from sourceSets.basic.output

manifest {
attributes 'Created-By': System.getProperty('java.version') + ' (' + System.getProperty('java.vendor') + ')',
"Specification-Title" : "Language processing interface: basic agpl3",
"Specification-Version" : version,
"Specification-Vendor" : "Kariminf",
"Implementation-Title" : "kariminf.langpi.basic-agpl3",
"Implementation-Version" : version + "-build" + current_Date ,
"Implementation-Vendor" : "Kariminf",
"Built-With": "gradle-${project.getGradle().getGradleVersion()}, groovy-${GroovySystem.getVersion()}",
"Build-Time": current_Date,
"Built-By": project.hasProperty('BF_USER') ? project.getProperty('BF_USER') : System.getProperty('user.name'),
"Built-On": "${InetAddress.localHost.hostName}/${InetAddress.localHost.hostAddress}"
}
manifest getManifest("Language processing interface: basic agpl3", "kariminf.langpi.basic-agpl3")
}


task jarEval(type: Jar) {
baseName = "langpi-eval"
from sourceSets.eval.output

manifest {
attributes 'Created-By': System.getProperty('java.version') + ' (' + System.getProperty('java.vendor') + ')',
"Specification-Title" : "Language processing interface: evaluation",
"Specification-Version" : version,
"Specification-Vendor" : "Kariminf",
"Implementation-Title" : "kariminf.langpi.eval",
"Implementation-Version" : version + "-build" + current_Date ,
"Implementation-Vendor" : "Kariminf",
"Built-With": "gradle-${project.getGradle().getGradleVersion()}, groovy-${GroovySystem.getVersion()}",
"Build-Time": current_Date,
"Built-By": project.hasProperty('BF_USER') ? project.getProperty('BF_USER') : System.getProperty('user.name'),
"Built-On": "${InetAddress.localHost.hostName}/${InetAddress.localHost.hostAddress}"
}
manifest getManifest("Language processing interface: evaluation", "kariminf.langpi.eval")

}


task jarWordnet(type: Jar) {
baseName = "langpi-wordnet"
from sourceSets.wordnet.output

manifest {
attributes 'Created-By': System.getProperty('java.version') + ' (' + System.getProperty('java.vendor') + ')',
"Specification-Title" : "Language processing interface: wordnet",
"Specification-Version" : version,
"Specification-Vendor" : "Kariminf",
"Implementation-Title" : "kariminf.langpi.wordnet",
"Implementation-Version" : version + "-build" + current_Date ,
"Implementation-Vendor" : "Kariminf",
"Built-With": "gradle-${project.getGradle().getGradleVersion()}, groovy-${GroovySystem.getVersion()}",
"Build-Time": current_Date,
"Built-By": project.hasProperty('BF_USER') ? project.getProperty('BF_USER') : System.getProperty('user.name'),
"Built-On": "${InetAddress.localHost.hostName}/${InetAddress.localHost.hostAddress}"
}
manifest getManifest("Language processing interface: wordnet", "kariminf.langpi.wordnet")
}

// artifacts
artifacts {
archives jarBasicMain
archives jarBasicAgpl3
archives jarEval
archives jarWordnet
archives jarEval
}


Expand All @@ -144,6 +138,7 @@ repositories {
maven { url 'https://jitpack.io' }
}


dependencies {
// The production code uses the SLF4J logging API at compile time
compile 'org.slf4j:slf4j-api:1.7.21'
Expand Down Expand Up @@ -174,23 +169,35 @@ dependencies {
//basic_agpl3Compile project(':k-toolja')

//compile project(':k-toolja')


testCompile 'junit:junit:4.12'
testCompile configurations.basicCompile
testCompile configurations.basic_mainCompile
testCompile configurations.basic_agpl3Compile
testCompile configurations.wordnetCompile
testCompile configurations.evalCompile


runtime configurations.basicRuntime
runtime configurations.basic_mainRuntime
runtime configurations.basic_agpl3Runtime
runtime configurations.evalRuntime
runtime configurations.wordnetRuntime
runtime configurations.evalRuntime

testRuntime configurations.basicRuntime
testRuntime configurations.basic_mainRuntime
testRuntime configurations.basic_agpl3Runtime
testRuntime configurations.wordnetRuntime
testRuntime configurations.evalRuntime
}

javadoc {
source = sourceSets.basic.allJava
source += sourceSets.basic_main.allJava
source += sourceSets.basic_agpl3.allJava
source += sourceSets.eval.allJava
source += sourceSets.wordnet.allJava
source += sourceSets.eval.allJava

options.memberLevel = JavadocMemberLevel.PRIVATE
//classpath = configurations.compile
Expand Down
4 changes: 3 additions & 1 deletion src/eval/java/kariminf/langpi/eval/ats/KRouge.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public KRouge (GramType gramType){
switch (gramType) {
case BI:
gramModelClass = BiGramModel.class;

break;
default:
gramModelClass = UniGramModel.class;
Expand Down Expand Up @@ -66,14 +67,15 @@ public void addModelSentence(List<String> sentence){


public void newModel(){

try {
currentModel = gramModelClass.newInstance();
models.add(currentModel);
} catch (InstantiationException | IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}


Expand Down
130 changes: 0 additions & 130 deletions src/test/java/kariminf/langpi/eval/ats/KRougeTest.java

This file was deleted.

2 changes: 1 addition & 1 deletion src/test/java/kariminf/langpi/eval/ats/KRougeTest1.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static void setUpBeforeClass() throws Exception {
peer = readFile("/krouge/e1.txt");

//System.out.println(models);
//System.out.println(peer);
System.out.println(peer);

}

Expand Down

0 comments on commit 89d6710

Please sign in to comment.