[−][src]Struct naromat::entities::sentence::Sentence
Structure of novel sentence.
Sentences are defined below:
- Starts from previous sentence or breakline
- End with sentence-terminators ('.', '。', '」'))
- '. '
- '。'
- '」'
- '!'
- '?'
- '!?'
Methods
impl Sentence
[src]
Implementation for novel sentence structure
pub fn new(sentence: &str) -> Self
[src]
pub fn print(self)
[src]
Print formatted sentence
Example
use naromat::entities::sentence::Sentence; let sentence = Sentence::new("我が輩は猫である。"); sentence.print()
pub fn get(self) -> String
[src]
Get string of formatted sentence
Example
use naromat::entities::sentence::Sentence; let sentence = Sentence::new("我が[輩:.]は[猫:ねこ]である"); assert_eq!(sentence.get(), "我が|輩《・》は|猫《ねこ》である");
Auto Trait Implementations
impl RefUnwindSafe for Sentence
impl Send for Sentence
impl Sync for Sentence
impl Unpin for Sentence
impl UnwindSafe for Sentence
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,