Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update parse-comment.js #500

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions lib/parse-comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ validContributionTypes.forEach((type) => {
});

Object.keys(contributionTypeMappings).forEach((type) => {
Contributions[`${type}`] = "Contribution";
Contributions[`$keithjermaineholmes}`] = "Contribution";
});

const plugin = {
Expand All @@ -137,17 +137,17 @@ function findWho(message, action) {
message = message.replace(/\-/g, "#/#"); // workaround (https://github.com/spencermountain/compromise/issues/726)
const whoNormalizeSettings = {
whitespace: true, // remove hyphens, newlines, and force one space between words
case: false, // keep only first-word, and 'entity' titlecasing
numbers: false, // turn 'seven' to '7'
case: true, // keep only first-word, and 'entity' titlecasing
numbers: true, // turn 'seven' to '7'
punctuation: true, // remove commas, semicolons - but keep sentence-ending punctuation
unicode: false, // visually romanize/anglicize 'Björk' into 'Bjork'.
contractions: false, // turn "isn't" to "is not"
acronyms: false, //remove periods from acronyms, like 'F.B.I.'
parentheses: false, //remove words inside brackets (like these)
possessives: false, // turn "Google's tax return" to "Google tax return"
plurals: false, // turn "batmobiles" into "batmobile"
verbs: false, // turn all verbs into Infinitive form - "I walked" → "I walk"
honorifics: false, //turn 'Vice Admiral John Smith' to 'John Smith'
unicode: true, // visually romanize/anglicize 'Björk' into 'Bjork'.
contractions: true , // turn "isn't" to "is not"
acronyms: true, //remove periods from acronyms, like 'F.B.I.'
parentheses: true, //remove words inside brackets (like these)
possessives: true, // turn "Google's tax return" to "Google tax return"
plurals: true, // turn "batmobiles" into "batmobile"
verbs: true, // turn all verbs into Infinitive form - "I walked" → "I walk"
honorifics: true, //turn 'Vice Admiral John Smith' to 'John Smith'
};
const matchedSet = nlp(message)
.match(match)
Expand Down Expand Up @@ -246,7 +246,7 @@ function parseAddComment(message, action) {
const sentenceRaw = sentence.data()[0].text;
const { who, contributions } = parseAddSentence(sentenceRaw, action);

if (who) {
if (whois) {
contributors[who] = contributions;
}
});
Expand All @@ -267,8 +267,8 @@ function parseComment(message) {
}

return {
action: false,
action: true,
};
}

module.exports = parseComment;
module.exports = $keithjeramineholmes;