Closed KentaroAOKI closed 2 years ago
Hello, thank you for opening this PR, ashis is a feature we have wanted to add, so it will be very useful if we can get it merged. It looks like the right code paths are present; however, it would be great if we could work out if any heavy workloads can be cached, such as saving the supertagger as an instance variable instead of loading it each time. Very happy to discuss things if you want any help.
Hi, I think the same thing. I'll make it on Saturday or Sunday.
Hi, DepCCGParser has been fixed. Please review the code.
https://github.com/CQCL/lambeq/pull/24/commits/d3a5b4fac3999cd5c877cd31689c3796b7e61be3
@KentaroAOKI I have added some changes to the code, mainly formatting and documentation. Otherwise, the implementation seemed great. I just made a small change in how tokenising is handled, could you have a look and let me know if it works for you? Thanks.
@KentaroAOKI I have added some changes to the code, mainly formatting and documentation. Otherwise, the implementation seemed great. I just made a small change in how tokenising is handled, could you have a look and let me know if it works for you? Thanks.
@ianyfan Some of the previous edits seem to have been overwritten by your last commit (e.g. lower-casing the language strings), please fix.
Thanks!
Hello! We are now working on Japanese QNLP by Lambeq following the installation of this page. We found that the present version of depccg_jp and Lambeq cannot treat sentences in which an adjectival verb (Keiyo-Do-Shi) modifies a noun. We give a list of sentences in which Lambeq + depccg_jp cannot create any string diagram. E..g 感動的な映画を見る 曖昧な表現をする 静かな海を見る 健康な男性が歩く 親切な男性がいる 元気な男性が歩く 上品な表現をする きれいな海を見る 健やかな男性が歩く 和やかな雰囲気を感じる 穏やかな笑顔を浮かべる 正直な男性がいる 有名な男性がいる にぎやかな雰囲気を感じる 特別な表現をする 複雑な表現をする まじめな男性がいる 下手な表現をする 便利な本を買う 朗らかな笑顔を浮かべる 幸せな笑顔を浮かべる 好きなスープを食べる 無理な計画を立てる 暇な男性がいる 必要な計画を立てる 邪魔なものをどかす 変な表現をする 自由な表現をする
We would like to know anyone who knows how to solve this problem.
By the way, this problem occurs when we use Lambeq ver. 0.2.6 and 0.3.1. We installed depccg_jp following the above instruction. Except for the sentence including adjectival verbs, depccg_jp + Lambeq works very well.
@masakiowari Hi, I have a created a top-level issue (#99) for this, in order to give it more visibility. For any follow-up, please use Issue #99.
Updated DepCCGParser to support Japanese. The sample code is as follows.
1. Prepare depccg.
2. Install Japanese fonts on Ubuntu.
3. Set the matplotlib Japanese font in the jupyter notebook python code.
4. Use sentence2diagram in the jupyter notebook python code.
5. Use ansatz in the jupyter notebook python code.
6. Use pytket in the jupyter notebook python code.