UNPKG

@botonic/plugin-contentful

Version:

Botonic Plugin Contentful is one of the **[available](https://github.com/hubtype/botonic/tree/master/packages)** plugins for Botonic. **[Contentful](http://www.contentful.com)** is a CMS (Content Management System) which manages contents of a great variet

25 lines (24 loc) 1.04 kB
import Tokenizer from '@nlpjs/core/src/tokenizer'; import { Locale } from './locales'; export declare function countOccurrences(haystack: string, needle: string): number; /** * Not using TokenizerCa from node-nlp because it does not stem correctly some * "pronoms febles" (eg. adonar-se'n) * It maintains ç & Ç, but maybe we should only do it when normalize=true? */ export declare class TokenizerCa implements Tokenizer { static RESTORE_CEDIL: RegExp; static SPLIT_REGEX: RegExp; static splitRegex(): RegExp; static restoreAfterTokenizer(text: string): string; tokenize(text: string, normalize?: boolean): string[]; private trim; } export declare function tokenizerPerLocale(locale: Locale): Tokenizer; export declare const DEFAULT_SEPARATORS = ";,./()!?\" "; export declare const DEFAULT_SEPARATORS_REGEX: RegExp; export declare const DEFAULT_NOT_SEPARATORS_REGEX: RegExp; export declare const DEFAULT_STOP_WORDS: { [key: string]: string[]; }; export declare function stopWordsFor(locale: string): string[];