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

Commit

Permalink
working on search
Browse files Browse the repository at this point in the history
  • Loading branch information
fulton committed Nov 17, 2019
1 parent 69c33ac commit 6c7307d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/main/java/com/andromeda/araserver/Run.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ private Run(int port) throws IOException {
InputStream is = classloader.getResourceAsStream("parse.bin");
assert is != null;
keyWord = new KeyWord(is);
new SortWords(keyWord, "what is the weather in portland oregon ?").getTopics();
//keyWord.getKeyWords("What is the weather in south oregon ?")[0].show();
System.out.println();
//(TOP (SBAR (WHNP (WP what)) (S (VP (VBZ is) (NP (NP (DT the) (NN value)) (PP (IN of) (NP (NN pi))))))))
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/andromeda/araserver/skills/GetInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import com.andromeda.araserver.util.KeyWord;
import com.andromeda.araserver.util.OutputModel;
import com.andromeda.araserver.util.SortWords;
import com.andromeda.araserver.util.WordGraph;
import com.google.gson.*;

import javax.net.ssl.HttpsURLConnection;
Expand Down Expand Up @@ -30,6 +32,8 @@ public String main(String mainurl, KeyWord keyWord) {
ArrayList<String> pairs = new ArrayList<>(Arrays.asList(mainurl.split("&")));
term = pairs.get(0);
System.out.println(term);
//NLP
ArrayList<WordGraph> graph = new SortWords(keyWord, "what is the weather in portland oregon ?").getTopics();
try {
getFast("ten times ten");
} catch (IOException e) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/andromeda/araserver/util/SortWords.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class SortWords(keyWord: KeyWord, mainVal: String) {
private val key = keyWord
private val mainText = mainVal
fun getTopics(): ArrayList<WordGraph> {
var toReturn = ArrayList<WordGraph>()
val toReturn = ArrayList<WordGraph>()

var graph = key.getKeyWords(mainText)?.get(0)

Expand Down

0 comments on commit 6c7307d

Please sign in to comment.