Skip to content

Commit

Permalink
Merge pull request #8 from yahoojapan/mnagaya/vespa7
Browse files Browse the repository at this point in the history
Cumulative updates
  • Loading branch information
yjtakamabe authored May 8, 2023
2 parents ee82743 + b9e3a40 commit 312a124
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 12 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Maven
run: mvn -B package --file pom.xml -Dvespa.version='7.244.2'
run: mvn -B package --file pom.xml -Dvespa.version='7.594.36'

- name: Publish to GitHub Packages Apache Maven
run: mvn deploy:deploy-file@deploy-file -s $GITHUB_WORKSPACE/settings.xml -Dvespa.version='7.244.2'
run: mvn deploy:deploy-file@deploy-file -s $GITHUB_WORKSPACE/settings.xml -Dvespa.version='7.594.36'
env:
GITHUB_TOKEN: ${{ github.token }}
7 changes: 4 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
- name: Build with Maven
run: mvn -B package --file pom.xml -Dvespa.version='7.244.2'
run: mvn -B package --file pom.xml -Dvespa.version='7.594.36'
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## [2.0.3] - 2022-12-20
### Fixed
- コード本体の変更点はありません

## [2.0.2] - 2022-10-07
### Fixed
- コード本体の変更点はありません

## [2.0.1] - 2022-05-25
### Fixed
- Vespa-7.585.20 以降に対応するための修正(以前の互換性は維持)

## [2.0.0] - 2021-09-06
### Cnahged
- Vespa-7.447.10 以降に対応するための修正

## [1.0.1] - 2020-10-21
### Fixed
- 一部の文字がトークナイズの際にエラー原因になる問題の修正
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ JDK (>= 11) and maven are required to build package.
Execute mvn command as below, and you can get package as target/kuromoji-linguistics-${VERSION}-deploy.jar

```
$ mvn package -Dvespa.version='7.244.2' # You can specify 7.244.2 or later.
$ mvn package -Dvespa.version='7.594.36' # You can specify 7.594.36 or later.
```

## Use Package
Expand Down
12 changes: 9 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<groupId>jp.co.yahoo.vespa</groupId>
<artifactId>kuromoji-linguistics</artifactId>
<version>1.0.1</version>
<version>2.0.3</version>
<packaging>container-plugin</packaging>

<name>kuromoji-linguistics</name>
Expand All @@ -30,7 +30,7 @@
<target-jdk.version>11</target-jdk.version>
<maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version>

<vespa.version>7-SNAPSHOT</vespa.version>
<vespa.version>7.594.36</vespa.version>
<guice.version>3.0</guice.version>

<kuromoji-ipadic.version>0.9.0</kuromoji-ipadic.version>
Expand Down Expand Up @@ -68,7 +68,13 @@
<version>${vespa.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.yahoo.vespa</groupId>
<artifactId>annotations</artifactId>
<version>${vespa.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.atilika.kuromoji</groupId>
<artifactId>kuromoji-ipadic</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,12 @@ public GramSplitter getGramSplitter() {
public CharacterClasses getCharacterClasses() {
return characterClasses;
}

/**
* {@inheritDoc}
*/
@Override
public boolean equals(Linguistics other) {
return (other instanceof KuromojiLinguistics);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public void testGramSplitter() throws Exception {
String input = "お寿司が食べたい。";
String[] expecteds = new String[]{"お寿", "寿司", "司が", "が食", "食べ", "べた", "たい"};
GramSplitterIterator actualIter = gramSplitter.split(input, 2);

for (String expected : expecteds) {
Gram gram = actualIter.next();
assertEquals(expected, input.substring(gram.getStart(), gram.getStart() + gram.getCodePointCount()));
Expand Down

0 comments on commit 312a124

Please sign in to comment.