Renard::Block::NLP - Natural language processing for English
version 0.001
fun apply_sentence_offsets_to_blocks( (InstanceOf['String::Tagged']) $text )
Retrieves the sentence offsets for each part of the $text
string that has been tagged as a block
and apply a sentence
tag to each sentence.
fun _get_offsets( $text )
This uses Lingua::EN::Sentence internally to determine the location of each sentence.
Returns an ArrayRef of ArrayRefs where the first item is the starting index and the second is the ending index of each sentence in $text
.
fun preprocess_for_tts( $text )
Preprocess $text
by using a number of substitutions for common abbreviations so that a speech synthesis engine can read the expanded versions.
Returns a Str
with the preprocessed text.
Project Renard
This software is copyright (c) 2017 by Project Renard.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.