0

我正在关注Google Prediction APIHello Prediction 示例

不幸的是,培训文件language_id.txt似乎以某种方式损坏了?我测试了使用谷歌浏览器和火狐下载它,同样的结果,看截图:

在此处输入图像描述

我认为,因此我的测试不起作用,我总是以示例字符串English 1.0的分数返回。Muy Bueno

  ...
  {
   "label": "English",
   "score": "1.000000"
  },
  ...

我从哪里获得可用的 language_id.txt 测试文件,或者我还能做些什么?

编辑:我的猜测是,该文件尚未以 UTF-8 格式存储在 Google 服务器上?

4

1 回答 1

2

The file is in UTF-8, but it doesn't declare an encoding, so viewing it in a browser assumes the default HTTP charset, ISO-8859-1.

I'm not sure why you're actually getting a corrupted copy (if I view it in Chrome, it appears corrupt, but saving it results in a correct UTF-8-encoded file), but perhaps you could try another mechanism to download it?

于 2014-08-02T21:42:44.467 回答