@types/stopword
Advanced tools
Comparing version 0.3.0 to 2.0.0
@@ -1,50 +0,90 @@ | ||
// Type definitions for stopword 0.3 | ||
// Type definitions for stopword 2.0 | ||
// Project: https://github.com/fergiemcdowall/stopword | ||
// Definitions by: Rico Sandyca Novenza <https://github.com/ricosandyca> | ||
// Piotr Błażejewicz <https://github.com/peterblazejewicz> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
/** | ||
* Stopword removal | ||
* | ||
* @param text Array string of words | ||
* @param stopwords Array string of your custom stopwords (default: English stopwords | .en) | ||
*/ | ||
export function removeStopwords(text: string[], stopwords?: string[]): string[]; | ||
export as namespace sw; | ||
/** | ||
* Get array of stopwords according by language code | ||
*/ | ||
export const af: string[]; | ||
export const ar: string[]; | ||
export const bn: string[]; | ||
export const br: string[]; | ||
export const da: string[]; | ||
export const de: string[]; | ||
export const en: string[]; | ||
export const es: string[]; | ||
export const fa: string[]; | ||
export const fr: string[]; | ||
export const fi: string[]; | ||
export const ha: string[]; | ||
export const he: string[]; | ||
export const hi: string[]; | ||
export const id: string[]; | ||
export const it: string[]; | ||
export const ja: string[]; | ||
export const lgg: string[]; | ||
export const lggo: string[]; | ||
export const my: string[]; | ||
export const nl: string[]; | ||
export const no: string[]; | ||
export const pa: string[]; | ||
export const pl: string[]; | ||
export const pt: string[]; | ||
export const ru: string[]; | ||
export const so: string[]; | ||
export const st: string[]; | ||
export const sv: string[]; | ||
export const sw: string[]; | ||
export const vi: string[]; | ||
export const yo: string[]; | ||
export const zh: string[]; | ||
export const zu: string[]; | ||
declare namespace stopword { | ||
interface Stopword { | ||
/** | ||
* Stopword removal | ||
* | ||
* @param text Array string of words | ||
* @param stopwords Array string of your custom stopwords (default: English stopwords | .en) | ||
*/ | ||
removeStopwords: (text: string[], stopwords?: string[]) => string[]; | ||
} | ||
type LanguageCode = | ||
| 'afr' | ||
| 'ara' | ||
| 'ben' | ||
| 'bre' | ||
| 'bul' | ||
| 'cat' | ||
| 'ces' | ||
| 'dan' | ||
| 'deu' | ||
| 'ell' | ||
| 'eng' | ||
| 'epo' | ||
| 'est' | ||
| 'eus' | ||
| 'fas' | ||
| 'fin' | ||
| 'fra' | ||
| 'gle' | ||
| 'glg' | ||
| 'guj' | ||
| 'hau' | ||
| 'heb' | ||
| 'hin' | ||
| 'hrv' | ||
| 'hun' | ||
| 'hye' | ||
| 'ind' | ||
| 'ita' | ||
| 'jpn' | ||
| 'kor' | ||
| 'kur' | ||
| 'lat' | ||
| 'lav' | ||
| 'lgg' | ||
| 'lggNd' | ||
| 'lit' | ||
| 'mar' | ||
| 'msa' | ||
| 'mya' | ||
| 'nld' | ||
| 'nob' | ||
| 'panGu' | ||
| 'pol' | ||
| 'por' | ||
| 'porBr' | ||
| 'ron' | ||
| 'rus' | ||
| 'slk' | ||
| 'slv' | ||
| 'som' | ||
| 'sot' | ||
| 'spa' | ||
| 'swa' | ||
| 'swe' | ||
| 'tgl' | ||
| 'tha' | ||
| 'tur' | ||
| 'ukr' | ||
| 'urd' | ||
| 'vie' | ||
| 'yor' | ||
| 'zho' | ||
| 'zul'; | ||
} | ||
declare const stopword: { | ||
[Language in stopword.LanguageCode]: string[]; | ||
} & stopword.Stopword; | ||
export = stopword; |
{ | ||
"name": "@types/stopword", | ||
"version": "0.3.0", | ||
"version": "2.0.0", | ||
"description": "TypeScript definitions for stopword", | ||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stopword", | ||
"license": "MIT", | ||
@@ -11,2 +12,7 @@ "contributors": [ | ||
"githubUsername": "ricosandyca" | ||
}, | ||
{ | ||
"name": "Piotr Błażejewicz", | ||
"url": "https://github.com/peterblazejewicz", | ||
"githubUsername": "peterblazejewicz" | ||
} | ||
@@ -23,4 +29,4 @@ ], | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "b6c01ec6f9546c38eedada3d01d5951d1750ef8178bd8c81604c43dd89ac8ee3", | ||
"typeScriptVersion": "2.8" | ||
"typesPublisherContentHash": "d408711ff03bb34ebf58fefb40f8748c9bd500c07d5ba600ec9c14b22bae6a40", | ||
"typeScriptVersion": "3.9" | ||
} |
@@ -9,9 +9,103 @@ # Installation | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stopword. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stopword/index.d.ts) | ||
````ts | ||
// Type definitions for stopword 2.0 | ||
// Project: https://github.com/fergiemcdowall/stopword | ||
// Definitions by: Rico Sandyca Novenza <https://github.com/ricosandyca> | ||
// Piotr Błażejewicz <https://github.com/peterblazejewicz> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
export as namespace sw; | ||
declare namespace stopword { | ||
interface Stopword { | ||
/** | ||
* Stopword removal | ||
* | ||
* @param text Array string of words | ||
* @param stopwords Array string of your custom stopwords (default: English stopwords | .en) | ||
*/ | ||
removeStopwords: (text: string[], stopwords?: string[]) => string[]; | ||
} | ||
type LanguageCode = | ||
| 'afr' | ||
| 'ara' | ||
| 'ben' | ||
| 'bre' | ||
| 'bul' | ||
| 'cat' | ||
| 'ces' | ||
| 'dan' | ||
| 'deu' | ||
| 'ell' | ||
| 'eng' | ||
| 'epo' | ||
| 'est' | ||
| 'eus' | ||
| 'fas' | ||
| 'fin' | ||
| 'fra' | ||
| 'gle' | ||
| 'glg' | ||
| 'guj' | ||
| 'hau' | ||
| 'heb' | ||
| 'hin' | ||
| 'hrv' | ||
| 'hun' | ||
| 'hye' | ||
| 'ind' | ||
| 'ita' | ||
| 'jpn' | ||
| 'kor' | ||
| 'kur' | ||
| 'lat' | ||
| 'lav' | ||
| 'lgg' | ||
| 'lggNd' | ||
| 'lit' | ||
| 'mar' | ||
| 'msa' | ||
| 'mya' | ||
| 'nld' | ||
| 'nob' | ||
| 'panGu' | ||
| 'pol' | ||
| 'por' | ||
| 'porBr' | ||
| 'ron' | ||
| 'rus' | ||
| 'slk' | ||
| 'slv' | ||
| 'som' | ||
| 'sot' | ||
| 'spa' | ||
| 'swa' | ||
| 'swe' | ||
| 'tgl' | ||
| 'tha' | ||
| 'tur' | ||
| 'ukr' | ||
| 'urd' | ||
| 'vie' | ||
| 'yor' | ||
| 'zho' | ||
| 'zul'; | ||
} | ||
declare const stopword: { | ||
[Language in stopword.LanguageCode]: string[]; | ||
} & stopword.Stopword; | ||
export = stopword; | ||
```` | ||
### Additional Details | ||
* Last updated: Wed, 26 Feb 2020 19:36:13 GMT | ||
* Last updated: Thu, 05 May 2022 18:01:38 GMT | ||
* Dependencies: none | ||
* Global values: none | ||
* Global values: `sw` | ||
# Credits | ||
These definitions were written by [Rico Sandyca Novenza](https://github.com/ricosandyca). | ||
These definitions were written by [Rico Sandyca Novenza](https://github.com/ricosandyca), and [Piotr Błażejewicz](https://github.com/peterblazejewicz). |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
6502
85
0
111