about summary refs log tree commit diff
path: root/corp/russian/data-import/src/main.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-01-18T00·22+0300
committertazjin <tazjin@tvl.su>2023-01-18T01·10+0000
commit485c3cc912a5713a22cd655c0e35d77d686e3ccc (patch)
tree83f6b7550f02917461582c2918f0a29fde1fc33c /corp/russian/data-import/src/main.rs
parentee7616d9563eabf2ae01927bc9d37ccf3e3b3325 (diff)
feat(corp/data-import): parse lemmas from OpenCorpora dump r/5684
Change-Id: I1e4efcfc8e555f61578b563411d5e6ed9590d8e8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7860
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'corp/russian/data-import/src/main.rs')
-rw-r--r--corp/russian/data-import/src/main.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/corp/russian/data-import/src/main.rs b/corp/russian/data-import/src/main.rs
index 336cc3d14f9f..9f2f5089a603 100644
--- a/corp/russian/data-import/src/main.rs
+++ b/corp/russian/data-import/src/main.rs
@@ -80,11 +80,11 @@ fn main() {
     let mut out = BufWriter::new(std::io::stdout().lock());
 
     while let Some(elem) = parser.next_element() {
-        match elem {
-            oc_parser::OcElement::Grammeme(g) => {
-                writeln!(out, "{:?}", g).ensure("writing element failed")
+        if let oc_parser::OcElement::Lemma(lemma) = elem {
+            if lemma.lemma.word == "тяжёлый" {
+                writeln!(out, "{:?}", lemma).ensure("writing output failed");
+                break;
             }
-            oc_parser::OcElement::Lemma(_) => continue,
         }
     }