From 1e5ad9ae0971cbd08c50ab0e904e2fbc21cd7a2d Mon Sep 17 00:00:00 2001 From: Arseny Tolmachev Date: Thu, 14 Dec 2023 10:48:50 +0900 Subject: [PATCH] correct documentation strings --- python/py_src/sudachipy/sudachipy.pyi | 7 ++++--- python/src/morpheme.rs | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/python/py_src/sudachipy/sudachipy.pyi b/python/py_src/sudachipy/sudachipy.pyi index 78230aa9..08f45bcb 100644 --- a/python/py_src/sudachipy/sudachipy.pyi +++ b/python/py_src/sudachipy/sudachipy.pyi @@ -207,14 +207,15 @@ class Morpheme: def surface(self) -> str: """ - Returns the projected string for the given morpheme (by default surface). - See Config.projection + Returns the substring of input text corresponding to the morpheme, or a projection if one is configured. + See `Config.projection`. """ ... def raw_surface(self) -> str: """ - Returns the surface string no matter the value of Config.projection + Returns the substring of input text corresponding to the morpheme regardless the configured projection. + See `Config.projection`. """ ... diff --git a/python/src/morpheme.rs b/python/src/morpheme.rs index d4f744d2..ab31f36c 100644 --- a/python/src/morpheme.rs +++ b/python/src/morpheme.rs @@ -291,7 +291,7 @@ impl PyMorpheme { self.morph(py).end_c() } - /// Returns the substring of input text corresponding to the morpheme + /// Returns the substring of input text corresponding to the morpheme, or a projection if one is configured #[pyo3(text_signature = "($self) -> str")] fn surface<'py>(&'py self, py: Python<'py>) -> &'py PyString { let list = self.list(py); @@ -302,7 +302,7 @@ impl PyMorpheme { } } - /// Returns the substring of input text corresponding to the morpheme + /// Returns the substring of input text corresponding to the morpheme regardless the configured projection #[pyo3(text_signature = "($self) -> str")] fn raw_surface<'py>(&'py self, py: Python<'py>) -> &'py PyString { PyString::new(py, self.morph(py).surface().deref())