Coder Social home page Coder Social logo

libpinyin's Issues

Assertion error when running gen_binary_files during fcitx-libpinyin's installation

Hi, I am getting the following error whilst building fcitx-libpinyin against latest libpinyin 1.1.91:

[ 89%] Generating bigram.db, art.bin, gb_char.bin, history.bin, nature.bin, scitech.bin, culture.bin, gbk_char.bin, life.bin, society.bin, economy.bin, geology.bin, merged.bin, sport.bin, phrase_index.bin, pinyin_index.bin
gen_binary_files: table_info.cpp:117: pinyin::TABLE_PHONETIC_TYPE to_table_phonetic_type(const char*): Assertion `(0)' failed.
/bin/sh: line 1:  1716 Aborted                 /usr/bin/gen_binary_files --table-dir /build/fcitx-libpinyin/src/fcitx-libpinyin-0.3.1/build/data
data/CMakeFiles/zhuyin_data.dir/build.make:79: recipe for target 'data/bigram.db' failed
make[2]: *** [data/bigram.db] Error 134

I think the error should be handled somewhere :)

在 link 时使用 --as-needed 参数,会出错

像 Archlinux 这样的发行版在打包时会加上 --as-needed 等许多参数,在编译 utils/trainning/ 下面的一些东西就会失败:

libtool: link: g++ -march=i686 -mtune=generic -O2 -pipe -Wl,--hash-style=gnu -Wl,--as-needed -o gen_unigram gen_unigram.o -lglib-2.0 ../../src/.libs/libpinyin.a -ldb -ldl
../../src/.libs/libpinyin.a(phrase_index.o): In function novel::SubPhraseIndex::load(MemoryChunk*, unsigned int, unsigned int)': phrase_index.cpp:(.text+0x16b2): undefined reference tog_return_if_fail_warning'
phrase_index.cpp:(.text+0x16e2): undefined reference to g_return_if_fail_warning' phrase_index.cpp:(.text+0x1715): undefined reference tog_return_if_fail_warning'
phrase_index.cpp:(.text+0x17c0): undefined reference to `g_return_if_fail_warning'

libpinyin.so failed to load when compiled with kyotocabinet

With the latest commit in fcitx-libpinyin, I am getting the following error when trying to switch to libpinyin:

(ERROR-12391 /build/fcitx/src/fcitx-4.2.9/src/lib/fcitx/ime.c:303) IM: open /usr/lib/fcitx/fcitx-libpinyin.so fail /usr/lib/libpinyin.so.6: undefined symbol: _ZTIN12kyotocabinet6ThreadE

Looks like libpinyin.so didn't link to kyotocabinet, and the symbol failed to load. I have tried to append -lkyotocabinet to LDFLAGS and this fixes it.

Please look into it, thanks!~

缺少对自带词库的文档描述

首先感谢你们的辛勤工作!
我使用的是 fcitx-libpinyin,对应的 libpinyin 版本是 0.3.1

软件包 fcitx-libpinyin 的信息:                                                                                                                                                                            
-------------------------------                                                                                                                                                                            
软件源:openSUSE-Oss-aliyun                                                                                                                                                                                
名称:fcitx-libpinyin                                                                                                                                                                                      
版本:0.3.1-5.1.9                                                                                                                                                                                          
架构:x86_64                                                                                                                                                                                               
厂商:openSUSE                                                                                                                                                                                             
已安装: 是                                                                                                                                                                                                
状态: 最新                                                                                                                                                                                                
已安装大小:29.2 MiB                                                                                                                                                                                       
摘要:Libpinyin Wrapper for Fcitx                                                                                                                                                                          
描述:                                                                                                                                                                                                     
  Fcitx-libpinyin is a Frontend of the Intelligent Pinyin IME Backend.      

我看到 libpinyin 自带了许多词库

12

请问:
1, 这些词库还持续更新吗?
2, 这些词库包含的词条能详细描述下吗?
3,这些词库与搜狗的那些细胞词库有什么关系吗?

compare_indexed_item_with_phrase_string中会出现与NULL比较?

用ibus-libpinyin,在输入特定的内容时会导致ibus-engine-libpinyin段错误,然后就稍微调试了一下,发现问题是出在compare_indexed_item_with_phrase_string函数中,candidate_rhs->m_phrase_string或candidate_lhs->m_phrase_string的值可能为0x0,导致strcmp时出错。

ibus版本是ubuntu 13.10中的1.4.2-0ubuntu2,
libpinyin为0.9.93
ibus-libpinyin是1.6.91+git20130424

libpinyin和ibus-libpinyin我用的是ppa编译的:https://launchpad.net/~xuzhen666/+archive/libpinyin

会出问题的组合有点多,比如“zhed”,出问题时,candidate_lhs->m_phrase_string指向“折兑”,candidate_rhs->m_phrase_string为NULL
又比如"zhes",candidate_lhs->m_phrase_string为NULL,candidate_rhs->m_phrase_string指向“者”

ibus-libpinyin输入法切换bug(长期没有修复)

抱歉,由于ibus-linpinyin没有开issues,就只好来这里写了。
问题是,从俄语、希腊语等非英文布局键盘切换到ibus-libpinyin的时候,中文输入法无法被激活;需要先切换到英文输入法,才能激活中文输入法。gnome版ibus和“正常的”ibus都有这个问题。
去年向ibus反馈过,ibus的fujiwarat告诉我很可能是因为libpinyin没有写键盘布局,tag'写的是default,这样当输入法切换的时候,就无法转换到英文布局来激活ibus-libpinyin。
ibus/ibus#2378
我现在在silverbule上不能修改/usr/share的内容,回头我可以用虚拟机自己修改试试看。也请你们注意这个bug,尽快找出原因。
谢谢

Advance dict management

I'm one of fcitx developer, actually I really want to drop the old fcitx pinyin and switch to a new one.
But there is current no library can support all feature of fcitx pinyin. At least there is no pinyin library can support multiple dict easily.

First I want an easy way to install dict and remove dict, if it only needs a separate file, it would be great.
Second I want an easy way to enable or disable a dict during run-time. Just a random thought.

I haven't tried libpinyin yet (even not look at the API yet), but after talk with a ibus-pinyin developer during FAD 2011, I was told that something about dict management is WIP. So I hope these feature can be taken into account.

And for another thing, I hope there is an API can add a word to dict by the string and given pinyin at run-time, and an easy API to get the current pinyin even using shuangpin, chewing or bopomofo.

Thank you.

fcitx-libpinyin需要libpinyin-tools

fcitx-libpinyin编译需要以下命令:

  • /usr/bin/gen_binary_files
  • /usr/bin/gen_unigram
  • /usr/bin/import_interpolation

libpinyin不再使用这些工具了么?

No package 'glib-2.0' found

Hi, I tried to compile libpinyin under Ubuntu 12.04 but after doing configure I got this error, while I'm sure the package is already installed.

Tks in advance!

pinyin::PinyinLookup2::train_result2 fails on`m_user_bigram->store(last_token, user)'

When selecting any non-default candidate in fcitx-libpinyin, it crashes immediately.

fcitx: pinyin_lookup2.cpp:599: bool pinyin::PinyinLookup2::train_result2(ChewingKeyVector, CandidateConstraints, MatchResults): Assertion `m_user_bigram->store(last_token, user)' failed.

PS: The build was using Kyotocabinet.

m_db has value but it seems the db operation failed. @wengxt points out that the error is the db was not opened.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.