Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Commit

Permalink
experiments with static in kotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
fulton committed Nov 19, 2019
1 parent 0e451a0 commit 58a1212
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
7 changes: 4 additions & 3 deletions src/main/java/com/andromeda/araserver/Run.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,14 @@ public void run() {
keyWord = new KeyWord(is);
System.out.println("test 1 done");
Objects.requireNonNull(keyWord.getKeyWords("What is the weather in south oregon ?"))[0].show();
;
keyWord.getKeyWords("What is the weather in south atlanta ?")[0].show();
System.out.println("done");


}
}).start();
;
keyWord.getKeyWords("What is the weather in south atlanta ?")[0].show();
System.out.println("done");

}

//(TOP (SBAR (WHNP (WP what)) (S (VP (VBZ is) (NP (NP (DT the) (NN value)) (PP (IN of) (NP (NN pi))))))))
Expand Down
12 changes: 4 additions & 8 deletions src/main/java/com/andromeda/araserver/util/KeyWord.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,22 @@ import java.io.InputStream

class KeyWord(parseIS:InputStream) {
val parse = parseIS
var m =ParserModel(parse)
var parser = ParserFactory.create(m)

var parser:Parser? = null


fun getKeyWords(mainVal:String): Array<out Parse>? {

return ParserTool.parseLine(mainVal, parser, 1)
}
init {
m =ParserModel(parse)
val m =ParserModel(parse)
parser = ParserFactory.create(m)
}
companion object{
@JvmStatic
fun test(){

}
}
}





0 comments on commit 58a1212

Please sign in to comment.