Skip to content

Commit

Permalink
Just pushing what I have
Browse files Browse the repository at this point in the history
  • Loading branch information
fras2560 committed Feb 6, 2018
1 parent 1e94b35 commit 1099408
Show file tree
Hide file tree
Showing 7 changed files with 245 additions and 307 deletions.
8 changes: 4 additions & 4 deletions src/index/IndexFiles.java
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,10 @@ public static void main(String[] args) {
+ " [-index INDEX_PATH] [-docs DOCS_PATH] [-logfile file] [-update]\n\n"
+ "This indexes the documents in DOCS_PATH, creating a Lucene index"
+ "in INDEX_PATH that can be searched with SearchFiles";
Path indexPath = Paths.get(System.getProperty("user.dir"), "resources", "index", "temp");
Path docsPath = Paths.get("/home", "d6fraser", "Documents", "Research", "Datasets", "NTCIR_TEMP");
Path logFile = Paths.get(System.getProperty("user.dir"), "resources", "logs", "NTCIRTemp.log");
boolean create = true;
Path indexPath = Paths.get(System.getProperty("user.dir"), "resources", "index", "full_arXiv", "firstAttempt");
Path docsPath = Paths.get(System.getProperty("user.dir"), "resources", "documents", "TODO");
Path logFile = Paths.get(System.getProperty("user.dir"), "resources", "logs", "NTCIRFull.log");
boolean create = false;
for(int i=0;i<args.length;i++) {
if ("-index".equals(args[i])) {
indexPath = Paths.get(args[i+1]);
Expand Down
108 changes: 0 additions & 108 deletions src/index/IndexThreadProducer.java

This file was deleted.

2 changes: 1 addition & 1 deletion src/programs/FindOptimalQueryWeight.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static void main(String[] args) throws Exception {
System.out.println(usage);
System.exit(0);
}
Path index = Paths.get(System.getProperty("user.dir"), "resources", "index", "arXiv", "current");
Path index = Paths.get(System.getProperty("user.dir"), "resources", "index", "full_arXiv", "tunaIndex");
Path queries = Paths.get(System.getProperty("user.dir"), "resources", "query", "NTCIR12-ArXiv.xml");
Path results = Paths.get(System.getProperty("user.dir"), "resources", "results", "NTCIR12-ArXiv-Math.dat");
String date = new SimpleDateFormat("dd-MM-yyyy:HH:mm").format(new Date());
Expand Down
6 changes: 3 additions & 3 deletions src/programs/FindOptimalWeight.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ public static void main(String[] args) throws Exception {
System.out.println(usage);
System.exit(0);
}
Path index = Paths.get(System.getProperty("user.dir"), "resources", "index", "ntcir-12-wikipedia", "current");
Path queries = Paths.get(System.getProperty("user.dir"), "resources", "query", "NTCIR12-MathWiki-main.xml");
Path results = Paths.get(System.getProperty("user.dir"), "resources", "results", "NTCIR12-MathWiki-main.dat");
Path index = Paths.get(System.getProperty("user.dir"), "resources", "index", "full_arXiv", "tunaIndex");
Path queries = Paths.get(System.getProperty("user.dir"), "resources", "query", "NTCIR12-ArXiv.xml");
Path results = Paths.get(System.getProperty("user.dir"), "resources", "results", "NTCIR12-ArXiv-Math.dat");
String date = new SimpleDateFormat("dd-MM-yyyy:HH:mm").format(new Date());
Path output = Paths.get(System.getProperty("user.dir"), "resources", "output", "arXiv", "weights", date + ".csv");
Path logFile = Paths.get(System.getProperty("user.dir"),
Expand Down
15 changes: 7 additions & 8 deletions src/programs/NTCIR_TEST.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,24 @@ public static void main(String[] args) throws Exception {
System.out.println(usage);
System.exit(0);
}
Path index = Paths.get(System.getProperty("user.dir"), "resources", "index", "ntcir-12-wikipedia", "current");
Path queries = Paths.get(System.getProperty("user.dir"), "resources", "query", "NTCIR12-MathWiki-formula.xml");
Path results = Paths.get(System.getProperty("user.dir"), "resources", "results", "NTCIR12-MathWiki-formula.dat");
Path index = Paths.get(System.getProperty("user.dir"), "resources", "index", "full_arXiv", "firstAttempt");
Path queries = Paths.get(System.getProperty("user.dir"), "resources", "query", "NTCIR12-ArXiv.xml");
Path results = Paths.get(System.getProperty("user.dir"), "resources", "results", "NTCIR12-ArXiv-Math.dat");
String date = new SimpleDateFormat("dd-MM-yyyy:HH:mm").format(new Date());
Path logFile = Paths.get(System.getProperty("user.dir"),
"resources",
"output",
"ntcir12-wikipedia",
"arXiv",
date + ".log");
Path queryOutput = Paths.get(System.getProperty("user.dir"),
"resources",
"output",
"ntcir12-wikipedia",
"arXiv",
date + "-queries.txt");
Path resultOutput = Paths.get(System.getProperty("user.dir"),
"resources",
"output",
"ntcir12-wikipedia",
"arXiv",
date + "-results.txt");
for(int i = 0;i < args.length;i++) {
if ("-index".equals(args[i])) {
Expand Down Expand Up @@ -106,8 +106,7 @@ public static void main(String[] args) throws Exception {
config.setQueryType(ConvertConfig.DIFFERENT_WEIGHTED_QUERY);
// do the actual searching
Search searcher = new Search(index, config);
searcher.setAlpha(0.05f);
searcher.setBeta(0.34f);
searcher.setAlpha(0.60f);
searcher.ntcirTest(queries, results, resultsWriter);
searcher.recordQueries(queries, queryWriter, 100);;
// close the files
Expand Down
2 changes: 1 addition & 1 deletion src/tangent/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def check_node(node):
# does it make sense to keep pairs of symbols with no path
# if one of those symbols is a wildcard
if len(node) == 3:
# if one is a wildcard the dont want to keep it
# if one is a wildcard then dont want to keep it
check = not(check_wildcard(node[0]) or check_wildcard(node[1]))
else:
# then both need to be a wildcard
Expand Down
Loading

0 comments on commit 1099408

Please sign in to comment.