(word)
| 57 | } |
| 58 | |
| 59 | function normalizeKeywordClient(word) { |
| 60 | if (!word) return ''; |
| 61 | let normalized = word.toLowerCase(); |
| 62 | const replacements = [ |
| 63 | /(?:ing|ingly)$/, /(?:edly)$/, /(?:tion|tions)$/, /(?:ment|ments)$/, |
| 64 | /(?:ness|nesses)$/, /(?:ally)$/, /(?:ies)$/, /(?:ers|er)$/, |
| 65 | /(?:less)$/, /(?:ful)$/, /(?:ous)$/, /(?:ly)$/, /(?:ed)$/, /(?:es)$/, /(?:s)$/ |
| 66 | ]; |
| 67 | for (const regex of replacements) { |
| 68 | normalized = normalized.replace(regex, ''); |
| 69 | } |
| 70 | return normalized; |
| 71 | } |
| 72 | |
| 73 | function initializeChunkKeywordMetadata(chunk) { |
| 74 | if (!chunk) return; |
no outgoing calls
no test coverage detected