hit-scir / libltp Goto Github PK
View Code? Open in Web Editor NEWltp for other language bindings
ltp for other language bindings
我在使用ltp-java
时编译报错
本地环境:Windows 11 专业版 版本:22621.1265
[D:\java\ltp\libltp\ltp-java]$ java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
[D:\java\ltp\libltp\ltp-java]$ cargo --version
cargo 1.68.1 (115f34552 2023-02-26)
[D:\java\ltp\libltp\ltp-java]$ gradle -v
------------------------------------------------------------
Gradle 8.0.2
------------------------------------------------------------
Build time: 2023-03-03 16:41:37 UTC
Revision: 7d6581558e226a580d91d399f7dfb9e3095c2b1d
Kotlin: 1.8.10
Groovy: 3.0.13
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 1.8.0_121 (Oracle Corporation 25.121-b13)
OS: Windows 10 10.0 amd64
我从仓库中把整个项目clone下来,
[D:\java\ltp\libltp\ltp-java]$ tree ./
卷 DATA 的文件夹 PATH 列表
卷序列号为 00000041 AE2A:AF4A
D:\JAVA\LTP\LIBLTP\LTP-JAVA
├─.gradle
│ ├─8.0.2
│ │ ├─checksums
│ │ ├─dependencies-accessors
│ │ ├─executionHistory
│ │ ├─fileChanges
│ │ ├─fileHashes
│ │ └─vcsMetadata
│ ├─buildOutputCleanup
│ └─vcs-1
├─build
│ ├─classes
│ │ └─java
│ │ ├─main
│ │ │ └─cn
│ │ │ └─edu
│ │ │ └─hit
│ │ │ └─ir
│ │ └─test
│ │ └─cn
│ │ └─edu
│ │ └─hit
│ │ └─ir
│ ├─generated
│ │ └─sources
│ │ ├─annotationProcessor
│ │ │ └─java
│ │ │ ├─main
│ │ │ └─test
│ │ └─headers
│ │ └─java
│ │ ├─main
│ │ └─test
│ ├─libs
│ ├─reports
│ │ └─tests
│ │ └─test
│ │ ├─classes
│ │ ├─css
│ │ ├─js
│ │ └─packages
│ ├─test-results
│ │ └─test
│ │ └─binary
│ └─tmp
│ ├─compileJava
│ ├─compileTestJava
│ ├─jar
│ └─test
├─gradle
│ └─wrapper
├─rust
│ └─src
└─src
├─main
│ ├─java
│ │ └─cn
│ │ └─edu
│ │ └─hit
│ │ └─ir
│ └─resources
└─test
├─java
│ └─cn
│ └─edu
│ └─hit
│ └─ir
└─resources
D:\java\ltp\libltp>cd ltp-java/rust && make lib
cargo build --release
Updating git repository `https://github.com/AlongWY/onnxruntime-rs.git`
Updating crates.io index
Compiling winapi v0.3.9
Compiling proc-macro2 v1.0.54
Compiling quote v1.0.26
Compiling memchr v2.5.0
Compiling libc v0.2.140
Compiling windows_x86_64_msvc v0.42.2
Compiling log v0.4.17
Compiling syn v1.0.109
error: linker `link.exe` not found
|
= note: program not found
note: the msvc targets depend on the msvc linker but `link.exe` was not found
note: please ensure that Visual Studio 2017 or later, or Build Tools for Visual Studio were installed with the Visual C++ option.
note: VS Code is a different product, and is not sufficient.
error: could not compile `windows_x86_64_msvc` due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `log` due to previous error
error: could not compile `quote` due to previous error
error: could not compile `memchr` due to previous error
error: could not compile `syn` due to previous error
error: could not compile `proc-macro2` due to previous error
error: could not compile `libc` due to previous error
error: could not compile `winapi` due to previous error
make: *** [lib] Error 101
D:\java\ltp\libltp\ltp-java\rust>cd .. && gradle build
> Task :test FAILED
LTPTest > test() FAILED
java.lang.ExceptionInInitializerError at LTPTest.java:12
Caused by: java.lang.NullPointerException at LTPTest.java:12
1 test completed, 1 failed
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///D:/java/ltp/libltp/ltp-java/build/reports/tests/test/index.html
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
4 actionable tasks: 1 executed, 3 up-to-date
我还在入门,不太懂这个,请帮忙看看。
谢谢 (^_^)
你好,我在使用过程中想只使用分词功能,看目前的pipeline_batch() 方法调用了所有任务。通过查看底层代码,
发现onnxruntime-rs.git?branch=al/dyn+cuda 这个分支提供session 的 run_with_options 方法,
通过以下方法发生段错误,这是onnx 不支持计算部分子图吗? 还是其他原因,谢谢。
let name_seg = String::from("seg");
let output_type_seg = TensorElementDataType::Int64;
let dimensions_seg: Vec<Option> = vec![None, None];
let output = Output{ name: name_seg,
output_type: output_type_seg,
dimensions : dimensions_seg
};
let output_names: Vec = vec![output];
println!("before onnx run with option");
println!("{:?}", output_names);
let mut result = self.session.run_with_options(input_arrays, &output_names)?;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.