facebook / facebook/duckling

Running Duckling on Windows

オープン
#349 コメント 11 件 リアクション 11 件 担当者 0 名 GitHub で見る
documentation
主要言語
Haskell
スター
4.3k
フォーク
740
PR マージ指標
30日以内にマージされた PR はありません

説明

Hello guys,

I'm having a hard time getting Duckling to run properly on Windows and I hope you can point me in the right direction.

Starting from the master branch, I've done some minor modifications, based on answers I encountered in other issues about windows 10 in this repo:

1. Replace `regex-pcre` with `regex-pcre-builtin` (setting up pcre on windows isn't an easy task)
2. Changed the path of the timezone folder in `ExampleMain.hs` from `/usr/share/zoneinfo` to `zoneinfo/` (and copied the folder with olson TZ to my windows machine)
3. Changed the import of `System.FilePath` in `TimeZone.hs` for `System.FilePath.Posix` (otherwise, it returns timezones like `America\\Los_Angeles`)

These changes were tried on a friend's OSX laptop and the app still ran just fine, so I guess it's something windows-related.

Everything compiles perfectly. Using curl to call the service returns effectively `quack!`. However, any call to /parse will yield an `Empty reply from server`.

While debugging manually, the issue arose when the line `parsedResult = parse...` is called in `ExampleMain.hs`.

Following the instructions in the readme, I ran the example query with `Duckling.Debug`

```
*Duckling.Debug> debug (makeLocale EN $ Just US) "in two minutes" [This Time]
*** Exception: user error (Text.Regex.PCRE.String died: (2,"invalid UTF-8 string"))
```

I've tried setting LANG=C.UTF-8 when building, and when running it, to no avail. Is there anything else I could check out ?

Thanks!

(On a side note, would it be feasible to save the output of `loadTimeZoneSeries` in a single file, which could be optional for users without Olson files? Copying 1700 files of 1k is a bit overkill, since the output of that call is simply a hash map of 13kb)

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。