mirror of
https://github.com/instant-labs/instant-segment.git
synced 2025-01-19 15:29:05 +00:00
Add new data files
This commit is contained in:
parent
fcf24c7543
commit
fee2adb995
262144
data/en-bigrams.txt
Normal file
262144
data/en-bigrams.txt
Normal file
File diff suppressed because it is too large
Load Diff
92638
data/en-unigrams.txt
Normal file
92638
data/en-unigrams.txt
Normal file
File diff suppressed because it is too large
Load Diff
@ -16,7 +16,7 @@ pub fn segmenter() -> Segmenter {
|
||||
let dir = PathBuf::from(format!("{}/../data", env!("CARGO_MANIFEST_DIR")));
|
||||
let mut ln = String::new();
|
||||
|
||||
let uni_file = dir.join("unigrams.txt");
|
||||
let uni_file = dir.join("en-unigrams.txt");
|
||||
let mut reader = BufReader::new(File::open(&uni_file).unwrap());
|
||||
let mut i = 0;
|
||||
let mut unigrams = HashMap::default();
|
||||
@ -33,7 +33,7 @@ pub fn segmenter() -> Segmenter {
|
||||
ln.clear();
|
||||
}
|
||||
|
||||
let bi_file = dir.join("bigrams.txt");
|
||||
let bi_file = dir.join("en-bigrams.txt");
|
||||
let mut reader = BufReader::new(File::open(&bi_file).unwrap());
|
||||
let mut i = 0;
|
||||
let mut bigrams = HashMap::default();
|
||||
|
Loading…
Reference in New Issue
Block a user