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

Commit 9de7f4c

Browse files
authored
refactor Confusion Matrix API (#904)
* refactor Confusion Matrix API * fix linting errors
1 parent 6bd5cf5 commit 9de7f4c

File tree

56 files changed

+4241
-1405
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+4241
-1405
lines changed

packages/dispatcher/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "1.0.0",
55
"author": "Microsoft",
66
"bugs": "https://github.com/microsoft/botframework-cli/issues",
7-
"main": "lib/src/index.js",
7+
"main": "lib/index.js",
88
"dependencies": {
99
"@microsoft/bf-lu": "1.0.0",
1010
"@oclif/command": "~1.5.19",

packages/dispatcher/src/data/AppColumnarData.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ export function exampleFunctionData(): ColumnarData {
7777
const args: any = parsedKnownArgs[0];
7878
const unknownArgs: any = parsedKnownArgs[1];
7979
Utility.debuggingLog(
80-
`args=${Utility.JSONstringify(args)}`);
80+
`args=${Utility.jsonStringify(args)}`);
8181
Utility.debuggingLog(
82-
`unknownArgs=${Utility.JSONstringify(unknownArgs)}`);
82+
`unknownArgs=${Utility.jsonStringify(unknownArgs)}`);
8383
const debugFlag: boolean = Utility.toBoolean(args.debug);
8484
Utility.toPrintDebuggingLogToConsole = debugFlag;
8585
// ---- NOTE-FOR-DEBUGGING ---- console.dir(args);

packages/dispatcher/src/data/AppEntityAnnotatedCorpusData.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ export function exampleFunctionData(): EntityAnnotatedCorpusData {
5353
const args: any = parsedKnownArgs[0];
5454
const unknownArgs: any = parsedKnownArgs[1];
5555
Utility.debuggingLog(
56-
`args=${Utility.JSONstringify(args)}`);
56+
`args=${Utility.jsonStringify(args)}`);
5757
Utility.debuggingLog(
58-
`unknownArgs=${Utility.JSONstringify(unknownArgs)}`);
58+
`unknownArgs=${Utility.jsonStringify(unknownArgs)}`);
5959
const debugFlag: boolean = Utility.toBoolean(args.debug);
6060
Utility.toPrintDebuggingLogToConsole = debugFlag;
6161
// ---- NOTE-FOR-DEBUGGING ---- console.dir(args);

packages/dispatcher/src/data/AppLuData.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ export async function exampleFunctionData(): Promise<string[]> {
4343
const args: any = parsedKnownArgs[0];
4444
const unknownArgs: any = parsedKnownArgs[1];
4545
Utility.debuggingLog(
46-
`args=${Utility.JSONstringify(args)}`);
46+
`args=${Utility.jsonStringify(args)}`);
4747
Utility.debuggingLog(
48-
`unknownArgs=${Utility.JSONstringify(unknownArgs)}`);
48+
`unknownArgs=${Utility.jsonStringify(unknownArgs)}`);
4949
const debugFlag: boolean = Utility.toBoolean(args.debug);
5050
Utility.toPrintDebuggingLogToConsole = debugFlag;
5151
// ---- NOTE-FOR-DEBUGGING ---- console.dir(args);

packages/dispatcher/src/data/data.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,13 +290,13 @@ export abstract class Data {
290290
public getFeaturizerLabels(): string[] {
291291
return this.getFeaturizer().getLabels();
292292
}
293-
public getFeaturizerLabelMap(): { [id: string]: number; } {
293+
public getFeaturizerLabelMap(): { [id: string]: number } {
294294
return this.getFeaturizer().getLabelMap();
295295
}
296296
public getFeaturizerFeatures(): string[] {
297297
return this.getFeaturizer().getFeatures();
298298
}
299-
public getFeaturizerFeatureMap(): { [id: string]: number; } {
299+
public getFeaturizerFeatureMap(): { [id: string]: number } {
300300
return this.getFeaturizer().getFeatureMap();
301301
}
302302

packages/dispatcher/src/data_structure/DictionaryMapUtility.ts

Lines changed: 319 additions & 12 deletions
Large diffs are not rendered by default.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License.
4+
*/
5+
6+
export interface IDictionaryNumberIdGenericSet<T> {
7+
[id: number]: Set<T>;
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License.
4+
*/
5+
6+
export interface IDictionaryStringIdGenericSet<T> {
7+
[id: string]: Set<T>;
8+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License.
4+
*/
5+
6+
export type TMapGenericKeyGenericSet<I, T> = Map<I, Set<T>>;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License.
4+
*/
5+
6+
import { TMapGenericKeyGenericSet } from "./TMapGenericKeyGenericSet";
7+
export type TMapNumberKeyGenericSet<T> = TMapGenericKeyGenericSet<number, T>;

0 commit comments

Comments
 (0)