d-ser-t-service
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -20,2 +20,3 @@ /// <reference types="node" /> | ||
constructor(harnessConfig: HarnessConfig); | ||
defineOutFile(filename: string): string; | ||
setTranscriptionService(): void; | ||
@@ -22,0 +23,0 @@ setLocalServices(): void; |
@@ -18,2 +18,3 @@ "use strict"; | ||
this.exceptions = harnessConfig.exceptions; | ||
this.outFile = harnessConfig.outFile; | ||
this.serviceRegion = harnessConfig.region; | ||
@@ -23,4 +24,6 @@ this.singleFile = harnessConfig.audioFile; | ||
this.transcriptionFile = harnessConfig.transcriptionFile; | ||
if (['json', 'xml'].includes(path_1.default.extname(String(harnessConfig.outFile)).substr(1))) { | ||
this.outFile = String(harnessConfig.outFile); | ||
} | ||
defineOutFile(filename) { | ||
if (['json', 'xml'].includes(path_1.default.extname(filename).substr(1))) { | ||
return filename; | ||
} | ||
@@ -35,3 +38,3 @@ else { | ||
} | ||
this.outFile = defaultDir + '/test_results.json'; | ||
return defaultDir + '/test_results.json'; | ||
} | ||
@@ -52,2 +55,3 @@ } | ||
this.xmlWriterService = new XmlWriterService_1.XmlWriterService(); | ||
this.outFile = this.defineOutFile(String(this.outFile)); | ||
} | ||
@@ -54,0 +58,0 @@ async singleFileTranscription() { |
@@ -35,2 +35,2 @@ import { TestMetaData, TestResult } from './types'; | ||
} | ||
//# sourceMappingURL=XMLWriterService.d.ts.map | ||
//# sourceMappingURL=XmlWriterService.d.ts.map |
@@ -49,3 +49,4 @@ "use strict"; | ||
.att('time', testingTime) | ||
.att('avg_SER', metadata.sentenceErrorRate); | ||
.att('avg_SER', metadata.sentenceErrorRate) | ||
.att('avg_WER', metadata.averageWordErrorRate); | ||
const testsuite = testsuites | ||
@@ -60,8 +61,10 @@ .ele('testsuite') | ||
.att('tests', numTests) | ||
.att('SER', metadata.sentenceErrorRate); | ||
.att('SER', metadata.sentenceErrorRate) | ||
.att('avg_WER', metadata.averageWordErrorRate); | ||
results.forEach((tc, index) => { | ||
const filename = path.parse(metadata.transcriptionFile).base; | ||
const testcase = testsuite | ||
.ele('testcase') | ||
.att('classname', `test-${index + 1}`) | ||
.att('name', `test-${index + 1}`) | ||
.att('name', filename) | ||
.att('time', 'n/a') | ||
@@ -110,2 +113,2 @@ .att('expected', tc.expectedTranscription); | ||
exports.XmlWriterService = XmlWriterService; | ||
//# sourceMappingURL=XMLWriterService.js.map | ||
//# sourceMappingURL=XmlWriterService.js.map |
{ | ||
"name": "d-ser-t-service", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Dynamic Sentence Error Rate Testing: A Package for testing the CRIS speech-to-text model, quantifying the quality of the model with respect to its Word Error Rate", | ||
@@ -60,3 +60,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "7d5061957cec6aa57b6080067f186e54bc42ca5a" | ||
"gitHead": "a942cbf536b56b9ea0ad546ee0fb8059cb177731" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
101354
1248