|
|
@ -13,15 +13,16 @@ char* getResultData(LVCSR_DATA_RESULT* pDataResult, long long nCount) {
|
|
|
|
char* skip1 = "<eps>";
|
|
|
|
char* skip1 = "<eps>";
|
|
|
|
char* space = " ";
|
|
|
|
char* space = " ";
|
|
|
|
int len = 0;
|
|
|
|
int len = 0;
|
|
|
|
|
|
|
|
long long i;
|
|
|
|
|
|
|
|
|
|
|
|
for (long long i = 0; i < nCount; i++) {
|
|
|
|
for (i = 0; i < nCount; i++) {
|
|
|
|
len += strlen(pDataResult[i].pTokenStr) + 1;
|
|
|
|
len += strlen(pDataResult[i].pTokenStr) + 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
char* result = malloc(sizeof(char) * len);
|
|
|
|
char* result = malloc(sizeof(char) * len);
|
|
|
|
strcpy(result, "");
|
|
|
|
strcpy(result, "");
|
|
|
|
|
|
|
|
|
|
|
|
for (long long i = 0; i < nCount; i++) {
|
|
|
|
for (i = 0; i < nCount; i++) {
|
|
|
|
if (strcmp(pDataResult[i].pTokenStr,skip1) == 0) {
|
|
|
|
if (strcmp(pDataResult[i].pTokenStr,skip1) == 0) {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
strcat(result, space);
|
|
|
|
strcat(result, space);
|
|
|
|