prg-projectator
Advanced tools
Comparing version 0.2.2 to 0.2.3
{ | ||
"name": "prg-projectator", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "project-development boost utility", | ||
@@ -20,2 +20,3 @@ "bin": { | ||
"handlebars": "^4.0.6", | ||
"lodash": "^4.17.4", | ||
"mongodb": "^2.2.24", | ||
@@ -22,0 +23,0 @@ "protagonist": "^1.6.5" |
@@ -9,3 +9,3 @@ 'use strict'; | ||
const translationMatcher = /#\.\s*(\{.+?\})(?:\n|.)+?msgstr "(.+?)"\n/im; | ||
const translationMatcher = /#\.\s*(\{.+?\})(?:\n|.)+?msgstr "(.*?)"\n/im; | ||
@@ -17,3 +17,4 @@ const items = poContent.match(new RegExp(translationMatcher, 'g')) | ||
return { text, intent, entities }; | ||
}); | ||
}) | ||
.filter(item => !!item.text); | ||
@@ -20,0 +21,0 @@ const trainingContent = { |
@@ -9,3 +9,14 @@ 'use strict'; | ||
const map = {}; | ||
const pot = json.rasa_nlu_data.common_examples | ||
.reduce((prev, item) => { | ||
if (!map[item.text]) { | ||
map[item.text] = true; | ||
prev.push(item); | ||
} else { | ||
console.error('DUPLICATION DETECTED:', item.text); | ||
} | ||
return prev; | ||
}, []) | ||
.map(item => ` | ||
@@ -16,3 +27,4 @@ #. ${JSON.stringify({ intent: item.intent, entities: item.entities })} | ||
`.replace(/\n\s+/g, '\n')) | ||
.join('\n'); | ||
.join('\n') | ||
.replace(/\n\n\n/g, '\n\n'); | ||
@@ -19,0 +31,0 @@ fs.writeFileSync(targetPath, pot, 'utf8'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67286
658
8
1
+ Addedlodash@^4.17.4
+ Addedlodash@4.17.21(transitive)