* @summary Extracts code-ish identifiers such as `mutate_frontier` as compact lexical terms. * @param {String} query Query string. * @returns {String[]} Normalized code terms.
(query)
| 746 | * @returns {String[]} Normalized code terms. |
| 747 | */ |
| 748 | extractCodeTerms(query) { |
| 749 | const matches = query.match(/[a-zA-Z][a-zA-Z0-9]*(?:[_-][a-zA-Z0-9]+)+/g) || []; |
| 750 | |
| 751 | return [...new Set(matches |
| 752 | .filter(match => !query.toLowerCase().includes(`${match.toLowerCase()}.`)) |
| 753 | .map(match => this.normalizeLexicalValue(match)) |
| 754 | .filter(term => term.length > 5))]; |
| 755 | } |
| 756 | |
| 757 | /** |
| 758 | * @summary Infers the public KB type for a local source path. |
no test coverage detected