Skip to content

Add OfflineDiacritization JAVA bindings - #3669

Merged
csukuangfj merged 1 commit into
k2-fsa:masterfrom
matiaslin:offline-diacritization-java-bindings
Jun 12, 2026
Merged

csukuangfj merged 1 commit into
k2-fsa:masterfrom
matiaslin:offline-diacritization-java-bindings

Conversation

@matiaslin

@matiaslin matiaslin commented Jun 10, 2026 •

Copy link
Copy Markdown
Contributor

In commit matiaslin@a2b7ab9, OfflineDiacritization was implemented for C-API, CXX-API and Python.

We provide the JAVA bindings for this feature.

Summary by CodeRabbit

  • New Features

    • Added offline diacritization capability to the Java API, enabling text diacritics processing using CATT ONNX models without external services.
    • Included example code demonstrating integration and usage of the offline diacritization feature.
  • Tests

    • Added automated test execution for offline diacritization in the CI/CD pipeline.

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 10, 2026
@coderabbitai

coderabbitai Bot commented Jun 10, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds complete Java/JNI support for offline ONNX-based diacritization. It introduces configuration classes that specify model paths and parameters, a Java JNI wrapper for lifecycle management, native C++ bindings that parse configs and delegate to underlying native code, build system integration, and a working example with automated test execution.

Changes

Offline Diacritization Java API and JNI Integration

Layer / File(s) Summary
Configuration schema for diacritization models
sherpa-onnx/java-api/src/main/java/com/k2fsa/sherpa/onnx/OfflineDiacritizationModelConfig.java, OfflineDiacritizationConfig.java
Two configuration classes define immutable settings: OfflineDiacritizationModelConfig specifies CATT encoder/decoder paths, thread count, debug, and provider with a fluent builder; OfflineDiacritizationConfig wraps the model config and provides a builder for composition.
Java JNI wrapper for diacritization
sherpa-onnx/java-api/src/main/java/com/k2fsa/sherpa/onnx/OfflineDiacritization.java
OfflineDiacritization loads native libraries, constructs native instances from config, exposes addDiacritics(String) as a thin wrapper delegating to native code, and implements resource cleanup via finalize() and release() with native delete calls.
Native JNI bindings for offline diacritization
sherpa-onnx/jni/offline-diacritization.cc
Implements four JNI entry points: newFromAsset/newFromFile constructors parse Java config into native OfflineDiacritizationConfig, validate, allocate instances, and return pointers; delete frees instances; addDiacritics converts Java strings to UTF-8, calls native processing, and returns results as Java strings.
Build system updates for JNI compilation and export
sherpa-onnx/java-api/Makefile, sherpa-onnx/jni/CMakeLists.txt, sherpa-onnx/jni/sherpa-onnx-symbols.exp
Makefile adds three Java sources to java_files for JAR compilation; CMakeLists.txt adds offline-diacritization.cc to JNI library sources; symbol export file exports four JNI functions for visibility.
Example application and CI integration
java-api-examples/OfflineAddDiacritics.java, java-api-examples/run-offline-add-diacritics.sh, .github/workflows/run-java-test.yaml
Example demonstrates end-to-end usage with model paths, fluent config builders, and Arabic sentence processing; shell script conditionally builds libraries, JAR, downloads model artifacts, and executes the example; CI workflow integrates the test step and artifact cleanup.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • k2-fsa/sherpa-onnx#2822: Both PRs touch the JNI shared-library symbol export/visibility pipeline—this PR adds OfflineDiacritization JNI entrypoints to sherpa-onnx/jni/sherpa-onnx-symbols.exp, while the retrieved PR introduces the symbol export/linker-script mechanism that controls those JNI exports.

Poem

A rabbit hops through diacritics clear,
Java wraps the native cheer,
Config flows from field to file,
Marking vowels with a smile—
Arabic text gains its flair! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the main change: adding Java bindings for the OfflineDiacritization feature across multiple files (JNI wrappers, config classes, native code integration, and example).
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces offline diacritization support (using a CATT model) to the Java API of sherpa-onnx, adding Java wrappers, a JNI implementation, and an integration example. The review feedback suggests several improvements to robustness and usability: adding defensive null and state checks in both Java and JNI layers to prevent JVM crashes, implementing AutoCloseable on OfflineDiacritization for safer native resource management, and adding missing getter methods to OfflineDiacritizationModelConfig.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread sherpa-onnx/jni/offline-diacritization.cc
Comment thread sherpa-onnx/jni/offline-diacritization.cc
@matiaslin
matiaslin force-pushed the offline-diacritization-java-bindings branch from 4859acf to c1b7f85 Compare June 10, 2026 19:48

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (3)
sherpa-onnx/java-api/src/main/java/com/k2fsa/sherpa/onnx/OfflineDiacritization.java (1)

20-23: ⚖️ Poor tradeoff

Consider replacing finalize() with try-with-resources.

finalize() has been deprecated since Java 9 and is unreliable for resource cleanup (non-deterministic timing, no guarantee it will run). Although the project currently targets Java 8 (per Makefile --release 8), implementing AutoCloseable would enable safer try-with-resources patterns and improve forward compatibility.

♻️ Optional refactor to implement AutoCloseable
-public class OfflineDiacritization {
+public class OfflineDiacritization implements AutoCloseable {
     private long ptr = 0;

     public OfflineDiacritization(OfflineDiacritizationConfig config) {
         LibraryLoader.maybeLoad();
         ptr = newFromFile(config);
         if (ptr == 0) {
             throw new IllegalArgumentException("Invalid OfflineDiacritizationConfig: failed to create native OfflineDiacritization");
         }
     }

     public String addDiacritics(String text) {
         return addDiacritics(ptr, text);
     }

     `@Override`
-    protected void finalize() throws Throwable {
-        release();
+    public void close() {
+        release();
     }

     // You'd better call it manually if it is not used anymore
-    public void release() {
+    public synchronized void release() {
         if (this.ptr == 0) {
             return;
         }
         delete(this.ptr);
         this.ptr = 0;
     }

Users can then write:

try (OfflineDiacritization diacrt = new OfflineDiacritization(config)) {
    String result = diacrt.addDiacritics(text);
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@sherpa-onnx/java-api/src/main/java/com/k2fsa/sherpa/onnx/OfflineDiacritization.java`
around lines 20 - 23, The class OfflineDiacritization currently uses a
deprecated finalize() to call release(); implement AutoCloseable instead: add
"implements AutoCloseable" to the OfflineDiacritization class, create a public
close() method that delegates to the existing release() logic (or refactor
release() to be the shared cleanup entry), remove finalize(), and update any
usages to support try-with-resources; ensure release()/close() is idempotent and
thread-safe if necessary.
sherpa-onnx/java-api/src/main/java/com/k2fsa/sherpa/onnx/OfflineDiacritizationModelConfig.java (1)

24-30: ⚡ Quick win

Add missing public getters for completeness.

The class exposes getCattEncoder() and getCattDecoder() but lacks public getters for numThreads, debug, and provider. This prevents callers from inspecting the full configuration after construction, breaking the symmetry between builder setters and config getters.

➕ Proposed fix to add the missing getters
 public String getCattDecoder() {
     return cattDecoder;
 }

+public int getNumThreads() {
+    return numThreads;
+}
+
+public boolean getDebug() {
+    return debug;
+}
+
+public String getProvider() {
+    return provider;
+}
+
 public static class Builder {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@sherpa-onnx/java-api/src/main/java/com/k2fsa/sherpa/onnx/OfflineDiacritizationModelConfig.java`
around lines 24 - 30, Add the missing public getters to
OfflineDiacritizationModelConfig to match the existing
getCattEncoder()/getCattDecoder() and the builder setters: implement public int
getNumThreads() returning the existing numThreads field, public boolean
isDebug() (or getDebug() if you prefer JavaBean style) returning the debug
field, and public String getProvider() returning the provider field; keep the
same visibility and naming pattern as the existing getters so callers can
inspect the full configuration after construction.
java-api-examples/OfflineAddDiacritization.java (1)

22-37: ⚡ Quick win

Release native resources explicitly in the example.

Line 22 creates a native-backed OfflineDiacritization, but it is not explicitly released after use (Lines 31-36). Please wrap usage in try/finally and call release() so this sample is safe in long-lived processes.

♻️ Suggested change
-    OfflineDiacritization diacrt = new OfflineDiacritization(config);
+    OfflineDiacritization diacrt = new OfflineDiacritization(config);

-    String[] sentences =
-        new String[] {
-          "وقالت مجلة نيوزويك الأمريكية التحديث الجديد ل إنستجرام يمكن أن يساهم في إيقاف وكشف الحسابات المزورة بسهولة شديدة",
-          "اللغة العربية من أقدم اللغات السامية",
-        };
-
-    System.out.println("---");
-    for (String text : sentences) {
-      String out = diacrt.addDiacritics(text);
-      System.out.printf("Input: %s\n", text);
-      System.out.printf("Output: %s\n", out);
-      System.out.println("---");
-    }
+    try {
+      String[] sentences =
+          new String[] {
+            "وقالت مجلة نيوزويك الأمريكية التحديث الجديد ل إنستجرام يمكن أن يساهم في إيقاف وكشف الحسابات المزورة بسهولة شديدة",
+            "اللغة العربية من أقدم اللغات السامية",
+          };
+
+      System.out.println("---");
+      for (String text : sentences) {
+        String out = diacrt.addDiacritics(text);
+        System.out.printf("Input: %s\n", text);
+        System.out.printf("Output: %s\n", out);
+        System.out.println("---");
+      }
+    } finally {
+      diacrt.release();
+    }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@java-api-examples/OfflineAddDiacritization.java` around lines 22 - 37, The
OfflineDiacritization instance created as "OfflineDiacritization diacrt = new
OfflineDiacritization(config);" holds native resources and must be released;
wrap its usage in a try/finally (or try-with-resources if supported) so that
after calling diacrt.addDiacritics(...) for each sentence you always call
diacrt.release() in the finally block to free native resources and avoid leaks.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@java-api-examples/run-offline-add-diacritics.sh`:
- Line 35: The JVM option -Djava.library.path currently uses an unquoted $PWD
which will split on spaces; update the script so the -Djava.library.path
assignment quotes the path (e.g. -Djava.library.path="$PWD/../build/lib") to
prevent argument splitting when directories contain spaces; locate the
occurrence of -Djava.library.path in the run-offline-add-diacritics.sh
invocation and wrap the quoted expansion accordingly.

In
`@sherpa-onnx/java-api/src/main/java/com/k2fsa/sherpa/onnx/OfflineDiacritization.java`:
- Around line 8-14: The OfflineDiacritization constructor must validate its
OfflineDiacritizationConfig parameter before calling native code: check that the
config argument is not null at the start of
OfflineDiacritization(OfflineDiacritizationConfig config) and throw an
appropriate IllegalArgumentException (or NullPointerException) with a clear
message if it is null; only call LibraryLoader.maybeLoad() and
newFromFile(config) after the null check, and keep using the existing ptr check
and error message if newFromFile returns 0.
- Around line 25-32: The release() method in OfflineDiacritization is racy and
can double-free the native pointer; make it thread-safe by guarding access to
the ptr field (e.g., synchronize the release() method or use an atomic
compare-and-set on ptr) so only one thread can call delete(this.ptr) and set
this.ptr = 0; ensure you reference the ptr field and the native delete(long)
call in your change and preserve behavior when ptr == 0.

In `@sherpa-onnx/jni/offline-diacritization.cc`:
- Around line 108-124: In
Java_com_k2fsa_sherpa_onnx_OfflineDiacritization_addDiacritics check the result
of env->GetStringUTFChars (ptext) for nullptr before using it; if ptext is
nullptr, signal an OOM to Java (e.g. env->ThrowNew on
java/lang/OutOfMemoryError) and return nullptr instead of calling
diacrt->AddDiacritics or ReleaseStringUTFChars, otherwise proceed as now and
ensure ReleaseStringUTFChars is only called when ptext was non-null (references:
function Java_com_k2fsa_sherpa_onnx_OfflineDiacritization_addDiacritics, symbols
GetStringUTFChars, ptext, ReleaseStringUTFChars, diacrt->AddDiacritics,
SafeNewStringUTF).

---

Nitpick comments:
In `@java-api-examples/OfflineAddDiacritization.java`:
- Around line 22-37: The OfflineDiacritization instance created as
"OfflineDiacritization diacrt = new OfflineDiacritization(config);" holds native
resources and must be released; wrap its usage in a try/finally (or
try-with-resources if supported) so that after calling diacrt.addDiacritics(...)
for each sentence you always call diacrt.release() in the finally block to free
native resources and avoid leaks.

In
`@sherpa-onnx/java-api/src/main/java/com/k2fsa/sherpa/onnx/OfflineDiacritization.java`:
- Around line 20-23: The class OfflineDiacritization currently uses a deprecated
finalize() to call release(); implement AutoCloseable instead: add "implements
AutoCloseable" to the OfflineDiacritization class, create a public close()
method that delegates to the existing release() logic (or refactor release() to
be the shared cleanup entry), remove finalize(), and update any usages to
support try-with-resources; ensure release()/close() is idempotent and
thread-safe if necessary.

In
`@sherpa-onnx/java-api/src/main/java/com/k2fsa/sherpa/onnx/OfflineDiacritizationModelConfig.java`:
- Around line 24-30: Add the missing public getters to
OfflineDiacritizationModelConfig to match the existing
getCattEncoder()/getCattDecoder() and the builder setters: implement public int
getNumThreads() returning the existing numThreads field, public boolean
isDebug() (or getDebug() if you prefer JavaBean style) returning the debug
field, and public String getProvider() returning the provider field; keep the
same visibility and naming pattern as the existing getters so callers can
inspect the full configuration after construction.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d727feec-4644-4b95-b164-cae75af86e54

📥 Commits

Reviewing files that changed from the base of the PR and between a2b7ab9 and 4859acf.

📒 Files selected for processing (10)
  • .github/workflows/run-java-test.yaml
  • java-api-examples/OfflineAddDiacritization.java
  • java-api-examples/run-offline-add-diacritics.sh
  • sherpa-onnx/java-api/Makefile
  • sherpa-onnx/java-api/src/main/java/com/k2fsa/sherpa/onnx/OfflineDiacritization.java
  • sherpa-onnx/java-api/src/main/java/com/k2fsa/sherpa/onnx/OfflineDiacritizationConfig.java
  • sherpa-onnx/java-api/src/main/java/com/k2fsa/sherpa/onnx/OfflineDiacritizationModelConfig.java
  • sherpa-onnx/jni/CMakeLists.txt
  • sherpa-onnx/jni/offline-diacritization.cc
  • sherpa-onnx/jni/sherpa-onnx-symbols.exp

Comment thread java-api-examples/run-offline-add-diacritics.sh
Comment thread sherpa-onnx/jni/offline-diacritization.cc

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (2)
java-api-examples/run-offline-add-diacritics.sh (1)

35-35: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Quote java.library.path to prevent argument splitting.

Line 35 should quote $PWD so paths with spaces do not break JVM option parsing.

🐛 Suggested fix
-  -Djava.library.path=$PWD/../build/lib \
+  -Djava.library.path="$PWD/../build/lib" \
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@java-api-examples/run-offline-add-diacritics.sh` at line 35, The JVM option
setting for java.library.path currently uses an unquoted $PWD which can split
into multiple arguments if the working directory contains spaces; update the
-Djava.library.path assignment (the token starting with -Djava.library.path= and
referencing $PWD) to wrap the path in double quotes (e.g., change
-Djava.library.path=$PWD/../build/lib to use quotes around the $PWD/../build/lib
expression) so the JVM receives the library path as a single argument.

Source: Linters/SAST tools

sherpa-onnx/jni/offline-diacritization.cc (1)

114-123: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Validate native pointer and UTF chars before dereference in addDiacritics.

Line 115 and Line 119 dereference values that can be null (ptr, ptext). This is a JVM crash path. Also, the missing GetStringUTFChars null-check was already reported earlier and is still present.

🐛 Suggested fix
 JNIEXPORT jstring JNICALL
 Java_com_k2fsa_sherpa_onnx_OfflineDiacritization_addDiacritics(JNIEnv *env,
                                                                jobject /*obj*/,
                                                                jlong ptr,
                                                                jstring text) {
   auto diacrt =
       reinterpret_cast<const sherpa_onnx::OfflineDiacritization *>(ptr);
+  if (diacrt == nullptr) {
+    env->ThrowNew(env->FindClass("java/lang/IllegalStateException"),
+                  "OfflineDiacritization has been released or not initialized");
+    return nullptr;
+  }
+
+  if (text == nullptr) {
+    env->ThrowNew(env->FindClass("java/lang/NullPointerException"),
+                  "text is null");
+    return nullptr;
+  }

   const char *ptext = env->GetStringUTFChars(text, nullptr);
+  if (ptext == nullptr) {
+    return nullptr;  // OOM/exception is already pending in JVM
+  }

   std::string result = diacrt->AddDiacritics(ptext);

   env->ReleaseStringUTFChars(text, ptext);

   return SafeNewStringUTF(env, result);
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@sherpa-onnx/jni/offline-diacritization.cc` around lines 114 - 123, Check for
null before dereferencing both the native pointer and the UTF chars: verify the
incoming ptr is non-zero before casting to const
sherpa_onnx::OfflineDiacritization* (the variable diacrt) and, after calling
env->GetStringUTFChars(text, nullptr), ensure ptext is non-null before using it;
if either is null, throw an appropriate Java exception (e.g.,
NullPointerException for a null native pointer, OutOfMemoryError for
GetStringUTFChars returning null) via env->ThrowNew and return nullptr, and only
call env->ReleaseStringUTFChars(text, ptext) when ptext is non-null; update the
addDiacritics native bridge to perform these checks around the reinterpret_cast,
env->GetStringUTFChars, and the call to diacrt->AddDiacritics, and continue
returning the result via SafeNewStringUTF only when no exception was thrown.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@sherpa-onnx/jni/offline-diacritization.cc`:
- Around line 18-25: GetOfflineDiacritizationConfig currently calls
env->GetObjectClass(config) and env->GetObjectClass(model_config) without
checking for null; add null guards so a null Java config/model yields a clean
JNI exception instead of crashing: check if config is null before calling
env->GetObjectClass(config) and if so call
env->ThrowNew(env->FindClass("java/lang/IllegalArgumentException"), "config is
null") (or return an appropriate error/null), and after obtaining model_config
via env->GetObjectField(config, fid) check if model_config is null before
calling env->GetObjectClass(model_config) and similarly throw or return; apply
these checks around the env->GetObjectClass(config), env->GetObjectField(config,
fid) and env->GetObjectClass(model_config) usage in
GetOfflineDiacritizationConfig.

---

Duplicate comments:
In `@java-api-examples/run-offline-add-diacritics.sh`:
- Line 35: The JVM option setting for java.library.path currently uses an
unquoted $PWD which can split into multiple arguments if the working directory
contains spaces; update the -Djava.library.path assignment (the token starting
with -Djava.library.path= and referencing $PWD) to wrap the path in double
quotes (e.g., change -Djava.library.path=$PWD/../build/lib to use quotes around
the $PWD/../build/lib expression) so the JVM receives the library path as a
single argument.

In `@sherpa-onnx/jni/offline-diacritization.cc`:
- Around line 114-123: Check for null before dereferencing both the native
pointer and the UTF chars: verify the incoming ptr is non-zero before casting to
const sherpa_onnx::OfflineDiacritization* (the variable diacrt) and, after
calling env->GetStringUTFChars(text, nullptr), ensure ptext is non-null before
using it; if either is null, throw an appropriate Java exception (e.g.,
NullPointerException for a null native pointer, OutOfMemoryError for
GetStringUTFChars returning null) via env->ThrowNew and return nullptr, and only
call env->ReleaseStringUTFChars(text, ptext) when ptext is non-null; update the
addDiacritics native bridge to perform these checks around the reinterpret_cast,
env->GetStringUTFChars, and the call to diacrt->AddDiacritics, and continue
returning the result via SafeNewStringUTF only when no exception was thrown.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0e943169-109e-4f4d-a93e-42c8ccebbd63

📥 Commits

Reviewing files that changed from the base of the PR and between 4859acf and c1b7f85.

📒 Files selected for processing (10)
  • .github/workflows/run-java-test.yaml
  • java-api-examples/OfflineAddDiacritics.java
  • java-api-examples/run-offline-add-diacritics.sh
  • sherpa-onnx/java-api/Makefile
  • sherpa-onnx/java-api/src/main/java/com/k2fsa/sherpa/onnx/OfflineDiacritization.java
  • sherpa-onnx/java-api/src/main/java/com/k2fsa/sherpa/onnx/OfflineDiacritizationConfig.java
  • sherpa-onnx/java-api/src/main/java/com/k2fsa/sherpa/onnx/OfflineDiacritizationModelConfig.java
  • sherpa-onnx/jni/CMakeLists.txt
  • sherpa-onnx/jni/offline-diacritization.cc
  • sherpa-onnx/jni/sherpa-onnx-symbols.exp
✅ Files skipped from review due to trivial changes (1)
  • sherpa-onnx/jni/CMakeLists.txt
🚧 Files skipped from review as they are similar to previous changes (6)
  • sherpa-onnx/java-api/src/main/java/com/k2fsa/sherpa/onnx/OfflineDiacritizationConfig.java
  • sherpa-onnx/java-api/src/main/java/com/k2fsa/sherpa/onnx/OfflineDiacritizationModelConfig.java
  • sherpa-onnx/java-api/Makefile
  • sherpa-onnx/jni/sherpa-onnx-symbols.exp
  • .github/workflows/run-java-test.yaml
  • sherpa-onnx/java-api/src/main/java/com/k2fsa/sherpa/onnx/OfflineDiacritization.java

Comment thread sherpa-onnx/jni/offline-diacritization.cc

@csukuangfj csukuangfj left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants