Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Comments

Weight support, fixing CV/test indexing bug, and refactoring#701

Merged
hcyang merged 1 commit intomasterfrom
hunyang/dispatcher_weightAndfixCVindexingBug
Apr 3, 2020
Merged

Weight support, fixing CV/test indexing bug, and refactoring#701
hcyang merged 1 commit intomasterfrom
hunyang/dispatcher_weightAndfixCVindexingBug

Conversation

@hcyang
Copy link
Contributor

@hcyang hcyang commented Apr 3, 2020

Weight support, fixing CV/test indexing bug, and refactoring

@hcyang hcyang requested review from daveta and tsuwandy April 3, 2020 17:59
Copy link
Contributor

@daveta daveta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per comments comments, in future might adopt dict instead of long arg lists for fns...

@hcyang hcyang merged commit 086b245 into master Apr 3, 2020
@@ -267,6 +323,7 @@ export class EntityAnnotatedCorpusData extends Data {
existingData as EntityAnnotatedCorpusData,
// ---- NOTE-NO-NEED-FOR-EntityAnnotatedCorpusData ---- labelColumnIndex,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why these comments are needed?

}

public retrieveLuUtterances(luLuisJsonStructure: any): any[] { // ---- NOTE: a shallow copy
public retrieveLuisLuUtterances(luLuisJsonStructure: any): any[] { // ---- NOTE: a shallow copy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we need a method for this?

"weight": number }> {
const weight: number = 1;
const utterancesArray: any[] =
this.retrieveLuisLuUtterances(luLuisJsonStructure);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this simply be:
const utterancesArray: any[] = luLuisJsonStructure.utterances;

}>,
"intent": string,
"text": string,
"weight": number }> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

who sets the weight or where the weight come from?

partOfSpeechTags,
intent,
text,
weight,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure where "weight" comes from?

let numberMatches: number = 0;
for (let i = 0; i < numberInstances; i++) {
const label: string = scoreDataStructure.labels[i];
// const text: string = scoreDataStructure.texts[i];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are the commented lines are ever going to be used? otherwise, can we get rid of unused code?

required: false,
},
);
parser.addArgument(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seen this one before, i feel like there should be one place where arguments for parser are constructed...

@munozemilio munozemilio deleted the hunyang/dispatcher_weightAndfixCVindexingBug branch February 12, 2021 21:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants