Overview of DropSuit NLP and the clnarr Function
DropSuit NLP is an open-source JavaScript and Node.js library offering diverse functions for natural language processing and data manipulation. The clnarr function is one of its modules, designed for cleaning and formatting arrays by removing duplicates, empty elements, and extra punctuation marks. It is available under the Apache License 2.0.
The clnarr function is a part of the DropSuit NLP library, it's a JavaScript and Node.js function that removes duplicates, empty elements, and extra punctuation marks from an array. It's open-source and available under the Apache License 2.0.
Add the library function by installing it via npm:
npm install dropsuit-clnarr
Import the library in your project:
const dropsuit_clnarr = require("dropsuit-clnarr");
Set boolean parameter (true/false) argument value to display console log processing results output information in terminal:
let dsclnarr = new dropsuit_clnarr(false);
- array: Raw array input.
- (0) Keep duplicate.
- (1) Remove duplicate.
- (2) Remove duplicate and extra marks.
Duplicate, empty element and extra punctuation marks free trimmed lower case strings array:
let out = dsclnarr.clnarr(inputArray, 2);
console.log(out);
Return object instance:
Input:
[
<1 empty item>,
' ,,hello ,world, ',
'world .,- ',
'hello , world .,..',
'world',
'',
undefined,
' ',
null,
<4 empty items>,
true,
'⬤',
"~!@#$%^off worlDs><'}{][|🌢*\\//()_ +*___/" ,
NaN,
'\n\n\n\n',
' heLLO',
'',
' ',
' ',
' . ,',
' ',
'abc',
'hello_world ',
<1 empty item>,
'',
'Hello ., ',
false,
'?',
'',
'hello',
'hello',
'hello !',
'hello !',
'hello!',
'... /',
1234,
-1,
<3 empty items>,
' hello$world ?,.'
]
Return type ( 2 ) --> Remove duplicate and extra marks:
[ 'abc', 'hello', 'hello world', 'off worlds', 'world' ]
DropSuit is an open-source library and I am dedicated to ensuring its continued development and improvement. If you have any questions, feedback, or encounter any issues, please reach out through the support via PayPal, and read more about support details.
Your support is crucial for the library's success. You can also contribute to the project by submitting bug reports, feature requests, or by providing feedback. Sharing the library with others who may find it useful and giving it a star on GitHub are also great ways to show your support. Thank you for using DropSuit!