Skip to content

Commit d28b002

Browse files
committed
Update examples
1 parent 0a518ba commit d28b002

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ java {
1717

1818
jar {
1919
archiveBaseName = "txtai"
20-
archiveVersion = "3.1.0"
20+
archiveVersion = "3.2.0"
2121
}

examples/src/main/java/EmbeddingsDemo.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static void main(String[] args) {
3535
System.out.printf("%-20s %s%n", "Query", "Best Match");
3636
System.out.println(new String(new char[50]).replace("\0", "-"));
3737

38-
for (String query: Arrays.asList("feel good story", "climate change", "health", "war", "wildlife", "asia", "north america", "dishonest junk")) {
38+
for (String query: Arrays.asList("feel good story", "climate change", "public health story", "war", "wildlife", "asia", "lucky", "dishonest junk")) {
3939
List<IndexResult> results = embeddings.similarity(query, data);
4040
int uid = results.get(0).id;
4141
System.out.printf("%-20s %s%n", query, data.get(uid));
@@ -48,13 +48,13 @@ public static void main(String[] args) {
4848
System.out.printf("%-20s %s%n", "Query", "Best Match");
4949
System.out.println(new String(new char[50]).replace("\0", "-"));
5050

51-
for (String query: Arrays.asList("feel good story", "climate change", "health", "war", "wildlife", "asia", "north america", "dishonest junk")) {
51+
for (String query: Arrays.asList("feel good story", "climate change", "public health story", "war", "wildlife", "asia", "lucky", "dishonest junk")) {
5252
List<SearchResult> results = embeddings.search(query, 1);
5353
int uid = Integer.parseInt(results.get(0).id);
5454
System.out.printf("%-20s %s%n", query, data.get(uid));
5555
}
5656

57-
data.set(0, "Feel good story: baby panda born");
57+
data.set(0, "See it: baby panda born");
5858

5959
List<Document> updates = new ArrayList<Document>();
6060
updates.add(new Document("0", data.get(0)));

examples/src/main/java/ExtractorDemo.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import java.util.Arrays;
21
import java.util.ArrayList;
2+
import java.util.Arrays;
33
import java.util.List;
44

55
import txtai.Extractor;
@@ -20,13 +20,13 @@ public static void main(String[] args) {
2020
Arrays.asList("Giants hit 3 HRs to down Dodgers",
2121
"Giants 5 Dodgers 4 final",
2222
"Dodgers drop Game 2 against the Giants, 5-4",
23-
"Blue Jays 2 Red Sox 1 final",
23+
"Blue Jays beat Red Sox final score 2-1",
2424
"Red Sox lost to the Blue Jays, 2-1",
2525
"Blue Jays at Red Sox is over. Score: 2-1",
2626
"Phillies win over the Braves, 5-0",
2727
"Phillies 5 Braves 0 final",
2828
"Final: Braves lose to the Phillies in the series opener, 5-0",
29-
"Final score: Flyers 4 Lightning 1",
29+
"Lightning goaltender pulled, lose to Flyers 4-1",
3030
"Flyers 4 Lightning 1 final",
3131
"Flyers win 4-1");
3232

0 commit comments

Comments
 (0)