Skip to content

project-renard/p5-Renard-Block-NLP

Repository files navigation

NAME

Renard::Block::NLP - Natural language processing for English

VERSION

version 0.001

FUNCTIONS

apply_sentence_offsets_to_blocks

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.

_get_offsets

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.

preprocess_for_tts

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.

SEE ALSO

Repository information

AUTHOR

Project Renard

COPYRIGHT AND LICENSE

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.