feat: Add Be and tbd skill, also added Roadmap file

This commit is contained in:
2026-05-10 16:32:12 -04:00
parent 3500ade13f
commit 0bb8885802
29587 changed files with 10611695 additions and 0 deletions

22
Skills/@be/node_modules/stemmer/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
(The MIT License)
Copyright (c) 2014-2015 Titus Wormer <tituswormer@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

90
Skills/@be/node_modules/stemmer/Readme.md generated vendored Normal file
View File

@@ -0,0 +1,90 @@
# stemmer [![Build Status](https://img.shields.io/travis/wooorm/stemmer.svg?style=flat)](https://travis-ci.org/wooorm/stemmer) [![Coverage Status](https://img.shields.io/coveralls/wooorm/stemmer.svg?style=flat)](https://coveralls.io/r/wooorm/stemmer?branch=master)
A pretty fast version of the [Porter stemming algorithm](http://tartarus.org/martin/PorterStemmer/).
> **Check out [wooorm/stmr.c](https://github.com/wooorm/stmr.c) for an even faster version**
## Installation
[npm](https://docs.npmjs.com/cli/install):
```bash
$ npm install stemmer
```
[Component.js](https://github.com/componentjs/component):
```bash
$ component install wooorm/stemmer
```
[Bower](http://bower.io/#install-packages):
```bash
$ bower install stemmer
```
[Duo](http://duojs.org/#getting-started):
```javascript
var stemmer = require('wooorm/stemmer');
```
## Usage
```javascript
var stemmer = require('stemmer');
stemmer("considerations"); // "consider"
stemmer("detestable"); // "detest"
stemmer("vileness"); // "vile"
```
## CLI
Install:
```bash
npm install --global stemmer
```
Use:
```text
Usage: stemmer [options] <words...>
A pretty fast implementation of the Porter Stemmer algorithm
Options:
-h, --help output usage information
-v, --version output version number
Usage:
# output stems
$ stemmer considerations
# consider
# output stems from stdin
$ echo "detestable vileness" | stemmer
# detest vile
```
## Benchmark
On a MacBook Air, it runs about 688,000 op/s.
```text
stemmer — this module
688 op/s » op/s * 1,000
porterStemmer
372 op/s » op/s * 1,000
natural - fails on 558 out of 23532 unit tests
63 op/s » op/s * 1,000
```
## License
[MIT](LICENSE) @ Titus Wormer

116
Skills/@be/node_modules/stemmer/cli.js generated vendored Normal file
View File

@@ -0,0 +1,116 @@
#!/usr/bin/env node
'use strict';
/*
* Dependencies.
*/
var stemmer,
pack;
pack = require('./package.json');
stemmer = require('./');
/*
* Detect if a value is expected to be piped in.
*/
var expextPipeIn;
expextPipeIn = !process.stdin.isTTY;
/*
* Arguments.
*/
var argv;
argv = process.argv.slice(2);
/*
* Command.
*/
var command;
command = Object.keys(pack.bin)[0];
/**
* Get the distance for a word.
*
* @param {Array.<string>} values
* @return {string}
*/
function stems(values) {
return values.map(stemmer).join(' ');
}
/**
* Help.
*
* @return {string}
*/
function help() {
return [
'',
'Usage: ' + command + ' [options] <words...>',
'',
pack.description,
'',
'Options:',
'',
' -h, --help output usage information',
' -v, --version output version number',
'',
'Usage:',
'',
'# output stems',
'$ ' + command + ' considerations',
'# ' + stems(['considerations']),
'',
'# output stems from stdin',
'$ echo "detestable vileness" | ' + command,
'# ' + stems(['detestable', 'vileness']),
''
].join('\n ') + '\n';
}
/**
* Get the edit distance for a list containing one word.
*
* @param {Array.<string>} values
*/
function getStems(values) {
if (values.length) {
console.log(stems(values));
} else {
process.stderr.write(help());
process.exit(1);
}
}
/*
* Program.
*/
if (
argv.indexOf('--help') !== -1 ||
argv.indexOf('-h') !== -1
) {
console.log(help());
} else if (
argv.indexOf('--version') !== -1 ||
argv.indexOf('-v') !== -1
) {
console.log(pack.version);
} else if (argv.length) {
getStems(argv.join(' ').split(/\s+/g));
} else if (!expextPipeIn) {
getStems([]);
} else {
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function (data) {
getStems(data.trim().split(/\s+/g));
});
}

324
Skills/@be/node_modules/stemmer/index.js generated vendored Normal file
View File

@@ -0,0 +1,324 @@
'use strict';
/*
* Define few standard suffix manipulations.
*/
var step2list,
step3list;
step2list = {
'ational': 'ate',
'tional': 'tion',
'enci': 'ence',
'anci': 'ance',
'izer': 'ize',
'bli': 'ble',
'alli': 'al',
'entli': 'ent',
'eli': 'e',
'ousli': 'ous',
'ization': 'ize',
'ation': 'ate',
'ator': 'ate',
'alism': 'al',
'iveness': 'ive',
'fulness': 'ful',
'ousness': 'ous',
'aliti': 'al',
'iviti': 'ive',
'biliti': 'ble',
'logi': 'log'
};
step3list = {
'icate': 'ic',
'ative': '',
'alize': 'al',
'iciti': 'ic',
'ical': 'ic',
'ful': '',
'ness': ''
};
/*
* Define few consonant-vowel sequences.
*/
var consonant,
vowel,
consonantSequence,
vowelSequence,
EXPRESSION_MEASURE_GREATER_THAN_0,
EXPRESSION_MEASURE_EQUAL_TO_1,
EXPRESSION_MEASURE_GREATER_THAN_1,
EXPRESSION_VOWEL_IN_STEM,
EXPRESSION_CONSONANT_LIKE;
consonant = '[^aeiou]';
vowel = '[aeiouy]';
consonantSequence = '(' + consonant + '[^aeiouy]*)';
vowelSequence = '(' + vowel + '[aeiou]*)';
EXPRESSION_MEASURE_GREATER_THAN_0 = new RegExp(
'^' + consonantSequence + '?' + vowelSequence + consonantSequence
);
EXPRESSION_MEASURE_EQUAL_TO_1 = new RegExp(
'^' + consonantSequence + '?' + vowelSequence + consonantSequence +
vowelSequence + '?$'
);
EXPRESSION_MEASURE_GREATER_THAN_1 = new RegExp(
'^' + consonantSequence + '?' + '(' + vowelSequence +
consonantSequence + '){2,}'
);
EXPRESSION_VOWEL_IN_STEM = new RegExp(
'^' + consonantSequence + '?' + vowel
);
EXPRESSION_CONSONANT_LIKE = new RegExp(
'^' + consonantSequence + vowel + '[^aeiouwxy]$'
);
/*
* Define few exception-expressions.
*/
var EXPRESSION_SUFFIX_LL,
EXPRESSION_SUFFIX_E,
EXPRESSION_SUFFIX_Y,
EXPRESSION_SUFFIX_ION,
EXPRESSION_SUFFIX_ED_OR_ING,
EXPRESSION_SUFFIX_AT_OR_BL_OR_IZ,
EXPRESSION_SUFFIX_EED,
EXPRESSION_SUFFIX_S,
EXPRESSION_SUFFIX_SSES_OR_IES,
EXPRESSION_SUFFIX_MULTI_CONSONANT_LIKE,
EXPRESSION_STEP_2,
EXPRESSION_STEP_3,
EXPRESSION_STEP_4;
EXPRESSION_SUFFIX_LL = /ll$/;
EXPRESSION_SUFFIX_E = /^(.+?)e$/;
EXPRESSION_SUFFIX_Y = /^(.+?)y$/;
EXPRESSION_SUFFIX_ION = /^(.+?(s|t))(ion)$/;
EXPRESSION_SUFFIX_ED_OR_ING = /^(.+?)(ed|ing)$/;
EXPRESSION_SUFFIX_AT_OR_BL_OR_IZ = /(at|bl|iz)$/;
EXPRESSION_SUFFIX_EED = /^(.+?)eed$/;
EXPRESSION_SUFFIX_S = /^.+?[^s]s$/;
EXPRESSION_SUFFIX_SSES_OR_IES = /^.+?(ss|i)es$/;
EXPRESSION_SUFFIX_MULTI_CONSONANT_LIKE = /([^aeiouylsz])\1$/;
EXPRESSION_STEP_2 = new RegExp(
'^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|' +
'ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|' +
'biliti|logi)$'
);
EXPRESSION_STEP_3 = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
EXPRESSION_STEP_4 = new RegExp(
'^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|' +
'iti|ous|ive|ize)$'
);
/*
* Detect the character code for `y`.
*/
var CHARACTER_CODE_Y;
CHARACTER_CODE_Y = 'y'.charCodeAt(0);
/**
* Stem `value`.
*
* @param {string} value
* @return {string} - Stem corresponding to `value`.
*/
function stemmer(value) {
var firstCharacterWasLowerCaseY,
match;
value = String(value).toLowerCase();
/*
* Exit early.
*/
if (value.length < 3) {
return value;
}
/*
* Detect initial `y`, make sure it never
* matches.
*/
if (value.charCodeAt(0) === CHARACTER_CODE_Y) {
firstCharacterWasLowerCaseY = true;
value = 'Y' + value.substr(1);
}
/*
* Step 1a.
*/
if (EXPRESSION_SUFFIX_SSES_OR_IES.test(value)) {
/*
* Remove last two characters.
*/
value = value.substr(0, value.length - 2);
} else if (EXPRESSION_SUFFIX_S.test(value)) {
/*
* Remove last character.
*/
value = value.substr(0, value.length - 1);
}
/*
* Step 1b.
*/
if (match = EXPRESSION_SUFFIX_EED.exec(value)) {
if (EXPRESSION_MEASURE_GREATER_THAN_0.test(match[1])) {
/*
* Remove last character.
*/
value = value.substr(0, value.length - 1);
}
} else if (
(match = EXPRESSION_SUFFIX_ED_OR_ING.exec(value)) &&
EXPRESSION_VOWEL_IN_STEM.test(match[1])
) {
value = match[1];
if (EXPRESSION_SUFFIX_AT_OR_BL_OR_IZ.test(value)) {
/*
* Append `e`.
*/
value += 'e';
} else if (
EXPRESSION_SUFFIX_MULTI_CONSONANT_LIKE.test(value)
) {
/*
* Remove last character.
*/
value = value.substr(0, value.length - 1);
} else if (EXPRESSION_CONSONANT_LIKE.test(value)) {
/*
* Append `e`.
*/
value += 'e';
}
}
/*
* Step 1c.
*/
if (
(match = EXPRESSION_SUFFIX_Y.exec(value)) &&
EXPRESSION_VOWEL_IN_STEM.test(match[1])
) {
/*
* Remove suffixing `y` and append `i`.
*/
value = match[1] + 'i';
}
/*
* Step 2.
*/
if (
(match = EXPRESSION_STEP_2.exec(value)) &&
EXPRESSION_MEASURE_GREATER_THAN_0.test(match[1])
) {
value = match[1] + step2list[match[2]];
}
/*
* Step 3.
*/
if (
(match = EXPRESSION_STEP_3.exec(value)) &&
EXPRESSION_MEASURE_GREATER_THAN_0.test(match[1])
) {
value = match[1] + step3list[match[2]];
}
/*
* Step 4.
*/
if (match = EXPRESSION_STEP_4.exec(value)) {
if (EXPRESSION_MEASURE_GREATER_THAN_1.test(match[1])) {
value = match[1];
}
} else if (
(match = EXPRESSION_SUFFIX_ION.exec(value)) &&
EXPRESSION_MEASURE_GREATER_THAN_1.test(match[1])
) {
value = match[1];
}
/*
* Step 5.
*/
if (
(match = EXPRESSION_SUFFIX_E.exec(value)) &&
(
EXPRESSION_MEASURE_GREATER_THAN_1.test(match[1]) ||
(
EXPRESSION_MEASURE_EQUAL_TO_1.test(match[1]) &&
!EXPRESSION_CONSONANT_LIKE.test(match[1])
)
)
) {
value = match[1];
}
if (
EXPRESSION_SUFFIX_LL.test(value) &&
EXPRESSION_MEASURE_GREATER_THAN_1.test(value)
) {
value = value.substr(0, value.length - 1);
}
/*
* Turn initial `Y` back to `y`.
*/
if (firstCharacterWasLowerCaseY) {
value = 'y' + value.substr(1);
}
return value;
}
/*
* Expose `stemmer`.
*/
module.exports = stemmer;

46
Skills/@be/node_modules/stemmer/package.json generated vendored Normal file
View File

@@ -0,0 +1,46 @@
{
"name": "stemmer",
"version": "0.1.4",
"description": "A pretty fast implementation of the Porter Stemmer algorithm",
"license": "MIT",
"keywords": [
"martin",
"porter",
"stemmer",
"algorithm",
"cli",
"bin"
],
"repository": {
"type": "git",
"url": "https://github.com/wooorm/stemmer.git"
},
"author": "Titus Wormer <tituswormer@gmail.com>",
"bin": {
"stemmer": "cli.js"
},
"devDependencies": {
"eslint": "^0.10.0",
"istanbul": "^0.3.0",
"jscs": "^1.0.0",
"jscs-jsdoc": "^0.4.0",
"matcha": "^0.6.0",
"mocha": "^2.0.0"
},
"scripts": {
"test": "_mocha --check-leaks test/index.js",
"test-cli": "bash test/index.sh",
"test-coveralls": "istanbul cover _mocha --report lcovonly -- --check-leaks test/index.js",
"test-travis": "npm run test-cli && npm run test-coveralls",
"coverage": "istanbul cover _mocha -- -- test/index.js",
"lint-api": "eslint --rule no-cond-assign:false index.js",
"lint-benchmark": "eslint --global suite,set,bench benchmark.js",
"lint-cli": "eslint --rule no-process-exit:false cli.js",
"lint-test": "eslint --env mocha test/index.js",
"lint-style": "jscs --reporter inline index.js benchmark.js cli.js test/index.js",
"lint": "npm run lint-api && npm run lint-benchmark && npm run lint-cli && npm run lint-test && npm run lint-style",
"make": "npm run lint && npm run coverage",
"install-benchmark": "npm install porter-stemmer && npm install natural",
"benchmark": "matcha benchmark.js"
}
}