Skip to content

Commit

Permalink
Merge pull request #184 from bab2min/dev/lengthening_typo
Browse files Browse the repository at this point in the history
장음화 오타 구현
  • Loading branch information
bab2min authored Sep 16, 2024
2 parents 1d4a2a3 + f1d2e83 commit d3503bd
Show file tree
Hide file tree
Showing 25 changed files with 855 additions and 471 deletions.
42 changes: 24 additions & 18 deletions .github/workflows/arm64_centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
lfs: true
- uses: bab2min/run-on-arch-action@use-custom-image
- uses: bab2min/run-on-arch-action@multiple-step
id: runcmd
with:
image: quay.io/pypa/manylinux2014_aarch64
Expand All @@ -23,24 +23,30 @@ jobs:
mkdir -p "${PWD}/artifacts"
dockerRunArgs: |
--volume "${PWD}/artifacts:/artifacts"
run: |
yum install java-1.8.0-openjdk-devel -y
mkdir build && pushd build && cmake -DCMAKE_BUILD_TYPE=Release -DKIWI_USE_MIMALLOC=0 -DKIWI_JAVA_BINDING=1 ..
make -j2 && popd
./build/test/kiwi-test
mkdir eval_results && ./build/kiwi-evaluator -m ./ModelGenerator eval_data/*.txt -o eval_results/ && ./build/kiwi-evaluator -m ./ModelGenerator eval_data/*.txt --sbg -o eval_results/
mkdir eval_results_balanced && KIWI_ARCH_TYPE=balanced ./build/kiwi-evaluator -m ./ModelGenerator eval_data/*.txt -o eval_results_balanced/
cp -r build /artifacts/
cp -r eval_results /artifacts/
curl -OL https://latina.bab2min.pe.kr/_data/kowiki1000.txt
KIWI_ARCH_TYPE=none ./build/kiwi-cli-* -m ./ModelGenerator -e -o test.out kowiki1000.txt
KIWI_ARCH_TYPE=balanced ./build/kiwi-cli-* -m ./ModelGenerator -e -o test.out kowiki1000.txt
KIWI_ARCH_TYPE=neon ./build/kiwi-cli-* -m ./ModelGenerator -e -o test.out kowiki1000.txt
multipleRun: |
- name: Install dependencies
run: |
yum install java-1.8.0-openjdk-devel -y
- name: Build
run: |
mkdir build && pushd build && cmake -DCMAKE_BUILD_TYPE=Release -DKIWI_USE_MIMALLOC=0 -DKIWI_JAVA_BINDING=1 ..
make -j2 && popd
- name: Test
run: |
./build/test/kiwi-test
mkdir eval_results && ./build/kiwi-evaluator -m ./ModelGenerator eval_data/*.txt -o eval_results/ && ./build/kiwi-evaluator -m ./ModelGenerator eval_data/*.txt --sbg -o eval_results/
cp -r build /artifacts/
cp -r eval_results /artifacts/
- name: Benchmark
run: |
curl -OL https://latina.bab2min.pe.kr/_data/kowiki1000.txt
KIWI_ARCH_TYPE=none ./build/kiwi-cli-* -m ./ModelGenerator -e -o test.out kowiki1000.txt
KIWI_ARCH_TYPE=balanced ./build/kiwi-cli-* -m ./ModelGenerator -e -o test.out kowiki1000.txt
KIWI_ARCH_TYPE=neon ./build/kiwi-cli-* -m ./ModelGenerator -e -o test.out kowiki1000.txt
- name: Archive binaries
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Artifacts ${{ matrix.name }}
name: Artifacts Arm64-Centos7
path: |
artifacts/build/*kiwi*
artifacts/build/test/*kiwi*
Expand Down
51 changes: 0 additions & 51 deletions .github/workflows/centos5.yml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/centos6.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/centos7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Centos7

on:
pull_request:
branches: [ main ]

jobs:
build-centos7:
name: Centos7
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: true
lfs: true
- uses: bab2min/run-on-arch-action@multiple-step
id: runcmd
with:
image: quay.io/pypa/manylinux2014_x86_64
githubToken: ${{ github.token }}
multipleRun: |
- name: Update CMake
run: |
/opt/python/cp310-cp310/bin/pip install cmake
yum install java-1.8.0-openjdk-devel.x86_64 -y
- name: Configure Build
run: mkdir build && cd build && /opt/python/cp310-cp310/bin/cmake -DCMAKE_BUILD_TYPE=Release -DKIWI_JAVA_BINDING=1 ..
- name: Build
run: cd build && make -j2
- name: Run Unit Test
run: ./build/test/kiwi-test
- name: Run Java Unit Test
run: |
cd bindings/java
curl -OL https://repo1.maven.org/maven2/junit/junit/4.13.2/junit-4.13.2.jar
curl -OL https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
javac -cp "*:../../build/bindings/java/*:." -encoding utf-8 kr/pe/bab2min/KiwiTest.java
java -cp "*:../../build/bindings/java/*:." org.junit.runner.JUnitCore kr.pe.bab2min.KiwiTest
- name: Run Evaluator
run: |
mkdir eval_results
./build/kiwi-evaluator -m ./ModelGenerator eval_data/*.txt -o eval_results/
./build/kiwi-evaluator -m ./ModelGenerator eval_data/*.txt --sbg -o eval_results/
- run: tar -zcvf arts.tgz build/*kiwi* build/test/*kiwi* eval_results/*.txt build/bindings/java/*.jar
- name: Archive binaries
uses: actions/upload-artifact@v3
with:
name: Artifacts Centos7
path: arts.tgz
4 changes: 2 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
name: ${{ matrix.name }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
lfs: true
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
KIWI_ARCH_TYPE=neon ./build/kiwi-cli-* -m ./ModelGenerator -e -o test.out --typos 6 kowiki1000.txt
fi
- name: Archive binaries
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Artifacts ${{ matrix.name }}
path: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ppc64le_centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
lfs: true
- uses: bab2min/run-on-arch-action@use-custom-image
- uses: bab2min/run-on-arch-action@multiple-step
id: runcmd
with:
image: quay.io/pypa/manylinux2014_ppc64le
Expand All @@ -32,11 +32,11 @@ jobs:
cp -r build /artifacts/
cp -r eval_results /artifacts/
- name: Archive binaries
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Artifacts ${{ matrix.name }}
name: Artifacts PPC64LE-Centos7
path: |
artifacts/build/*kiwi*
artifacts/build/test/*kiwi*
artifacts/eval_results/*.txt
artifacts/build/binding/java/*.jar
artifacts/build/binding/java/*.jar
Loading

0 comments on commit d3503bd

Please sign in to comment.