[new lib] pcodec
使用分位数的数值数据的无损压缩和解压缩工具。用法示例:
代码语言:javascript复制use pco::standalone::{auto_compress, auto_decompress};
use pco::DEFAULT_COMPRESSION_LEVEL;
fn main() {
// your data
let mut my_ints = Vec::new();
for i in 0..100000 {
my_ints.push(i as i64);
}
// Here we let the library choose a configuration with default compression
// level. If you know about the data you're compressing, you can compress
// faster by creating a `CompressorConfig`.
let compressed: Vec<u8> = auto_compress(&my_ints, DEFAULT_COMPRESSION_LEVEL);
println!("compressed down to {} bytes", compressed.len());
// decompress
let recovered = auto_decompress::<i64>(&compressed).expect("failed to decompress");
println!("got back {} ints from {} to {}", recovered.len(), recovered[0], recovered.last().unwrap());
}
GitHub: https://github.com/mwlon/pcodec
[new lib] postagger
词性标注工具。使用示例:
代码语言:javascript复制use postagger::PerceptronTagger;
fn main() {
let tagger = PerceptronTagger::new( "tagger/weights.json" , "tagger/classes.txt" , "tagger/tags.json" ) ;
let tags = tagger.tag( "the quick brown fox jumps over the lazy dog" ) ;
for tag in &tags {
println!( "{} {} {}" , tag.word , tag.tag , tag.conf ) ;
}
}
GitHub: https://github.com/shubham0204/postagger.rs
[new lib] ballast
一个简单的 API 负载测试工具,可用于比较 API 的性能。
GitHub: https://github.com/synoet/ballast
[new lib] rust-ecosystem-simulation
一个简单的生态系统模拟器。
GitHub: https://github.com/bones-ai/rust-ecosystem-simulation
From 日报小组 长琴