Skip to content

Complete swear filter package which support most languages and more than 10000 words

License

Notifications You must be signed in to change notification settings

Behiwzad/swearify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swearify

Complete swear filter package which support most languages and more than 10000 words .

Installation

npm install swearify --save

Usage

const filter = require('swearify');

const result = filter.findAndFilter (
'Lorem ipsum dolor fUck amet, consectetur xxx elit, sed do жопа tempor incididunt fuck ut sex et 
dolore magna aliqua, lorem دیوس dolor sit amet, consectetur بیناموس elit, sed do eiusmod tempor incididunt
ut b*tch et dolore ковровщик aliqua 🖕',                   // your sentence to filter
'▩',                                                      // placeholder
['en',  'fa',  'ru'],                                     // filter in which languages
['sex'],                                                  // allowed swears
[],                                                       // add your own words
);

console.log(result);

Output

{

found: true,

selected_languages: [ 'en', 'fa', 'ru' ],

bad_words: [ 'ковровщик', 'بیناموس', 'b*tch', 'fuck', 'دیوس', 'жопа', 'sex', 'xxx', 'xx', '🖕'],

filtered_sentense: 'Lorem ipsum dolor ▩▩▩▩ amet, consectetur ▩▩▩ elit, sed do ▩▩▩▩ tempor incididunt ▩▩▩▩ ut sex et dolore magna aliqua, lorem ▩▩▩▩ dolor sit amet, consectetur ▩▩▩▩▩▩▩ elit, sed do eiusmod tempor incididunt ut b*▩▩▩▩▩ et dolore ▩▩▩▩▩▩▩▩▩ aliqua ▩▩',

allowed_words: [ 'sex' ]

}

Supported Languages

language code country words number
Belarusian be 135
Bulgarian bg 135
Catalan ca 132
Welsh cy 144
Danish da 139
German de 133
Greek el 131
English en 2863
Spanish es 125
Estonian et 133
Basque eu 143
Persian fa 271
Finnish fi 133
French fr 126
Gaelic gd 137
Galician gl 134
Hindi hi 137
Croatian hr 135
Hungarian hu 134
Armenian hy 137
Indonesian id 115
Icelandic is 131
Italian it 131
Japanese ja 122
Kannada kn 140
Korean ko 119
Latin la 145
Lithuanian lt 130
Latvian lv 136
Macedonian mk 130
Malayalam ml 134
Mongolian mn 140
Marathi mr 136
Malay ms 137
Maltese mt 141
Dutch nl 138
Polish pl 133
Portuguese pt 132
Romanian ro 139
Russian ru 139
Slovak sk 140
Slovenian sl 130
Albanian sq 139
Serbian sr 142
Swedish sv 135
Telugu te 144
Thai th 138
Turkish tr 132
Ukrainian uk 136
Uzbek uz 141
Vietnamese vi 115
Zulu zu 140