文档丰富期间出错。详细信息:"无法识别文档的语言。"

时间:2018-01-31 16:11:30

标签: node.js watson watson-discovery

我试图在Discovery上索引文档,但其中一个文档导致了这个错误:

package com.exemple.myapplication;

import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.ArrayAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;

import java.util.ArrayList;

public class UserInfo_Activity extends AppCompatActivity {
    SQLiteDatabase database;
    private String TABLE_NAME = "RunningLog";
    private ArrayList<String> Runs;
    private ListView list;


@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_user_info_);

    ArrayList<String> Runs = new ArrayList<String>();
    list = (ListView) findViewById(R.id.listView);


    database = this.openOrCreateDatabase("Runs", 0, null);
    database.execSQL("CREATE TABLE IF NOT EXISTS " +
            TABLE_NAME +
            " (Date VARCHAR," +
            " Time VARCHAR, steps INT, distance DOUBLE);");

    database.execSQL("DELETE FROM " + TABLE_NAME);
    SetInList();
}

public void SetInList() {
    {
        database = UserInfo_Activity.this.openOrCreateDatabase("Runs", MODE_PRIVATE, null);
        Cursor c = database.rawQuery("SELECT * FROM " +
                TABLE_NAME + "", null);
        try {
            if (c != null) {
                if (c.moveToFirst()) {
                    do {
                        String Date = c.getString(c.getColumnIndex("Date"));
                        int steps = c.getInt(c.getColumnIndex("Steps"));
                        String Time = c.getString(c.getColumnIndex("Time"));
                        double Distance = c.getDouble(c.getColumnIndex("Distance"));


                        Runs.add(Date + "  " + Distance + "  " + Time);
                    } while (c.moveToNext());
                }
            }
        } catch (SQLiteException se) {
            Log.e(getClass().getSimpleName(), se.toString());
        }

        ArrayAdapter <String> adapter = new ArrayAdapter<String>(UserInfo_Activity.this, android.R.layout.simple_expandable_list_item_1, Runs);
        list.setAdapter(adapter);
    }


}
}

这是我试图转换的文字:

Error during document enrichment. Details: "The language of the document could not be identified."

这是我的索引功能:

Ao tentar emitir uma nota fiscal eletrônica o sistema apresenta a seguinte mensagem: Informar email no cadastro de clientes.
Acessar o cadastro do cliente no qual está emitindo a nota fiscal eletrônica, na aba Complementares e informar o e-mail do cliente no campo E-Mail.

有人知道为什么会出现这个问题吗?在Discovery上索引文档时有没有办法直接指定语言?

1 个答案:

答案 0 :(得分:2)

发现对语言的处理在2017年中期得到了加强。我最好的猜测是你使用的version_date字符串早于2017年中期。您可以尝试使用最新的version_date 2017-11-07吗?使用较早的version_date Discovery尝试自动检测语言,这有几个不足之处。使用更新的version_date值,每个集合上指定的语言将用作丰富的指定语言。