Return a snake-cased input.
0.1.0
input (string)
granularity (SegmentGranularity = "grapheme" | "word" | "sentence")
lang (BCP47LangTag)
(Array<string>)
: Returns an array of strings.
piupiu.stringSegmenter('Bonjour !', 'grapheme', 'fr');
// ["B", "o", "n", "j", "o", "u", "r", " ", "!"]
piupiu.stringSegmenter('Bonjour Monsieur Martin !', 'word', 'fr');
// ["Bonjour", "Monsieur", "Martin"]
piupiu.stringSegmenter('Bonjour Madame Ambre !', 'sentence', 'fr');
// ["Bonjour Madame Ambre !"],