import { getMatchingSentences } from 'ranuts';const text = 'This is the first sentence. This is the second sentence containing keyword. This is the third sentence.';const sentences = getMatchingSentences(text, 'keyword');console.log(sentences); // ['This is the second sentence containing keyword.']
import { getMatchingSentences } from 'ranuts';const text = 'First sentence contains keyword. Second sentence also contains keyword. Third sentence does not.';const sentences = getMatchingSentences(text, 'keyword');console.log(sentences); // ['First sentence contains keyword.', 'Second sentence also contains keyword.']
import { getMatchingSentences } from 'ranuts';const text = 'Short sentence keyword. This is a long sentence containing keyword.';const sentences = getMatchingSentences(text, 'keyword');// Solo se conserva la frase más largaconsole.log(sentences); // ['This is a long sentence containing keyword.']