-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for another languages? #12
Comments
Sure. That's kind of the purpose of separating out fcitx-bridge. Which language(s) do you need? |
Gujarati(gu) and Hindi(hi) |
Some logic change required. I tried myself but failed as I'm new to rust. error : out of index. URL : https://inputtools.google.com/request?text=aa&itc=zh-t-i0-pinyin&num=5&cp=0&cs=1&ie=utf-8&oe=utf-8&app=demopage URL : https://inputtools.google.com/request?text=aa&itc=gu-t-i0-und&num=5&cp=0&cs=1&ie=utf-8&oe=utf-8&app=demopage URL : https://inputtools.google.com/request?text=aa&itc=hi-t-i0-und&num=5&cp=0&cs=1&ie=utf-8&oe=utf-8&app=demopage |
when changing URL, output error
|
Hi, I am sorry for the late reply. I can definitely add support to these two languages. People also asked for Nepali. But I think as you can see, each languages is handled slightly differently and so this will take time to implement. (Also, we may need a new name for this project.) Now, you seem to know these two languages well enough, and I know nothing. So, please let me know the following so I can decide what to do next:
|
Yes, it is implemented but cloud backend provides better suggestions (In my usage, approx. 30-40% more accurate). Any GNU/Linux OS doesn't have like this. In Windows & macOS, transliteration keyboard of many Indian languages is inbuilt provided.
Yes, regular US layout.
Yes
Yes Note: Most of the Indian languages (20+) and nepali also have same output as I have listed in earlier comment. There will be less effort as there will be no annotation or matched_len variables. Just catch the output json,display and write. |
Thanks for answering the question. I am able to implement it. I will close this issue once it's done. |
I started implementing different languages. Do you expect to switch between input methods, like, switching between Hindi and Gujarati? |
No. English & Any language - regular switching. |
i found some languages link for google ime output json is ["SUCCESS",[["nepal",["नेपाल","नेपल","नपाल","नेप्ल","णेपल"],[],{"candidate_type":[0,0,0,0,0]}]]] source for this suggestion: https://github.com/siddharth17196/english-hindi-transliteration |
i think changing language using configuration file in user config folder is best. and add language map variable to change language link like this lang_maps = { |
Yes, I am aware of those available languages. Thanks. |
The difficulty of this approach is that we don't necessarily know that each language has the same interaction. For example, as we discussed, the interaction between Gujirati, Hindi and Nepali are similar but they are different from Pinyin. So it's easy to say let's just put those in a map and load different URL to get candidates, but that won't necessarily give us the best input experience. Also, I think we need to consider the installation. I haven't close your issue about installation instruction because I haven't had a good plan yet. But here is what I have now:
The end result of 1-5 is, the release of an input method will come with both the input method and the bridge. I will offer a script and a manual installation guide so one can install and uninstall an input method. Please let me know if you have different opinions. |
+1 for this approach |
Can we use if-else expression to distinguish pinyin and other input methods? This might simplify the input configuration for different languages. Instead of having separate input config for each language, we could just have one conf file for fcitx and one for fpc to switch languages. Moreover, if we separate the input methods, we could add more transliteration data that google input can’t handle, such as numbers and punctuations. This would improve the accuracy and convenience of typing in various languages. |
Yes, it's possible, but for now I would probably go with the approach I outlined earlier (for the reasons mentioned there). The approach you suggested has been adopted by Rime but I don't have that much bandwidth to spend. I prefer minimize efforts to rely on Fcitx5 as much as we can and keep things simple. |
Ready for testing ? Any how to ? |
I am sorry I haven't got a chance to finish it. But I have made some big progress. I will try to find sometime to work on it this weekend. |
OK, the input method for Nepali is done. I will make a script to generate package to install and update readme. Hindi and Gujarati will come next. |
Hi everyone, I have made a release for both Pinyin and Nepali. |
copied release files first in local paths then copied in system directories |
Please read the release note. You paths are incorrect:
In summary, the correct paths should be:
|
I discovered that the installation directories are all accurate, but the FCP executable is compiled with a newer version of glibc. Specifically, it’s looking for version GLIBC_2.38, which is not found (and required) by FCP. It seems that bleeding-edge Linux distributions are the ones that typically include this updated glibc package. |
My comments about incorrect directory (breaking folder structure) was based on the comments you made. It seems you found the right folders. That's good. Regarding linking the newer version of the system libraries, you are right. In fact, I just found out that both fcp (the input method itself) and the bridge (enabling talking to Fcitx5) link to so many system libraries and that means, any one of them being incompatible will cause the input method fail to run. Honestly, I am surprised that by default both languages (C++ and Rust) rely on linking so much. This is means distributing the binaries directly isn't a good solution. However, I still hope I could do that. So here is my plan:
Hopefully this will solve your issue. In the meantime, you can manually build both project and generate the files so you can install. Install NuShell (it doesn't need to be your default shell, just |
BTW, here is how much libraries they rely on. It's honestly shocking: ldd /usr/lib/fcitx5/libbridge-fcn.so 02/17/24 08:08:21 AM
linux-vdso.so.1 (0x00007ffec3350000)
libFcitx5Core.so.7 => /usr/lib/libFcitx5Core.so.7 (0x00007aedc8ba5000)
libprotobuf.so.25 => /usr/lib/libprotobuf.so.25 (0x00007aedc8800000)
libFcitx5Utils.so.2 => /usr/lib/libFcitx5Utils.so.2 (0x00007aedc8754000)
libzmq.so.5 => /usr/lib/libzmq.so.5 (0x00007aedc866f000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007aedc8200000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007aedc864a000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007aedc801e000)
libFcitx5Config.so.6 => /usr/lib/libFcitx5Config.so.6 (0x00007aedc8628000)
libxkbcommon.so.0 => /usr/lib/libxkbcommon.so.0 (0x00007aedc85df000)
libuuid.so.1 => /usr/lib/libuuid.so.1 (0x00007aedc8b9a000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007aedc85c5000)
libabsl_die_if_null.so.2308.0.0 => /usr/lib/libabsl_die_if_null.so.2308.0.0 (0x00007aedc85c0000)
libabsl_statusor.so.2308.0.0 => /usr/lib/libabsl_statusor.so.2308.0.0 (0x00007aedc85b8000)
libabsl_log_internal_check_op.so.2308.0.0 => /usr/lib/libabsl_log_internal_check_op.so.2308.0.0 (0x00007aedc85af000)
libabsl_log_internal_conditions.so.2308.0.0 => /usr/lib/libabsl_log_internal_conditions.so.2308.0.0 (0x00007aedc85aa000)
libabsl_log_internal_message.so.2308.0.0 => /usr/lib/libabsl_log_internal_message.so.2308.0.0 (0x00007aedc859d000)
libabsl_log_internal_nullguard.so.2308.0.0 => /usr/lib/libabsl_log_internal_nullguard.so.2308.0.0 (0x00007aedc8598000)
libabsl_raw_hash_set.so.2308.0.0 => /usr/lib/libabsl_raw_hash_set.so.2308.0.0 (0x00007aedc8591000)
libabsl_hash.so.2308.0.0 => /usr/lib/libabsl_hash.so.2308.0.0 (0x00007aedc858c000)
libabsl_status.so.2308.0.0 => /usr/lib/libabsl_status.so.2308.0.0 (0x00007aedc8581000)
libabsl_cord.so.2308.0.0 => /usr/lib/libabsl_cord.so.2308.0.0 (0x00007aedc856d000)
libabsl_cordz_info.so.2308.0.0 => /usr/lib/libabsl_cordz_info.so.2308.0.0 (0x00007aedc8566000)
libabsl_synchronization.so.2308.0.0 => /usr/lib/libabsl_synchronization.so.2308.0.0 (0x00007aedc8552000)
libabsl_time.so.2308.0.0 => /usr/lib/libabsl_time.so.2308.0.0 (0x00007aedc853e000)
libabsl_time_zone.so.2308.0.0 => /usr/lib/libabsl_time_zone.so.2308.0.0 (0x00007aedc8524000)
libabsl_str_format_internal.so.2308.0.0 => /usr/lib/libabsl_str_format_internal.so.2308.0.0 (0x00007aedc850c000)
libabsl_strings.so.2308.0.0 => /usr/lib/libabsl_strings.so.2308.0.0 (0x00007aedc84ef000)
libabsl_throw_delegate.so.2308.0.0 => /usr/lib/libabsl_throw_delegate.so.2308.0.0 (0x00007aedc84e9000)
libabsl_raw_logging_internal.so.2308.0.0 => /usr/lib/libabsl_raw_logging_internal.so.2308.0.0 (0x00007aedc84e2000)
libabsl_spinlock_wait.so.2308.0.0 => /usr/lib/libabsl_spinlock_wait.so.2308.0.0 (0x00007aedc84dd000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007aedc8ccb000)
libsystemd.so.0 => /usr/lib/libsystemd.so.0 (0x00007aedc7f2a000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007aedc7e3e000)
libgnutls.so.30 => /usr/lib/libgnutls.so.30 (0x00007aedc7c00000)
libsodium.so.26 => /usr/lib/libsodium.so.26 (0x00007aedc847d000)
libpgm-5.3.so.0 => /usr/lib/libpgm-5.3.so.0 (0x00007aedc7bb6000)
libabsl_base.so.2308.0.0 => /usr/lib/libabsl_base.so.2308.0.0 (0x00007aedc7e37000)
libabsl_examine_stack.so.2308.0.0 => /usr/lib/libabsl_examine_stack.so.2308.0.0 (0x00007aedc7e32000)
libabsl_log_internal_format.so.2308.0.0 => /usr/lib/libabsl_log_internal_format.so.2308.0.0 (0x00007aedc7e2c000)
libabsl_log_internal_proto.so.2308.0.0 => /usr/lib/libabsl_log_internal_proto.so.2308.0.0 (0x00007aedc7e27000)
libabsl_strerror.so.2308.0.0 => /usr/lib/libabsl_strerror.so.2308.0.0 (0x00007aedc7e22000)
libabsl_log_internal_log_sink_set.so.2308.0.0 => /usr/lib/libabsl_log_internal_log_sink_set.so.2308.0.0 (0x00007aedc7e1c000)
libabsl_log_internal_globals.so.2308.0.0 => /usr/lib/libabsl_log_internal_globals.so.2308.0.0 (0x00007aedc7e17000)
libabsl_log_globals.so.2308.0.0 => /usr/lib/libabsl_log_globals.so.2308.0.0 (0x00007aedc7e11000)
libabsl_city.so.2308.0.0 => /usr/lib/libabsl_city.so.2308.0.0 (0x00007aedc7e0a000)
libabsl_low_level_hash.so.2308.0.0 => /usr/lib/libabsl_low_level_hash.so.2308.0.0 (0x00007aedc7e05000)
libabsl_cord_internal.so.2308.0.0 => /usr/lib/libabsl_cord_internal.so.2308.0.0 (0x00007aedc7ba5000)
libabsl_crc_cord_state.so.2308.0.0 => /usr/lib/libabsl_crc_cord_state.so.2308.0.0 (0x00007aedc7b9e000)
libabsl_cordz_functions.so.2308.0.0 => /usr/lib/libabsl_cordz_functions.so.2308.0.0 (0x00007aedc7b99000)
libabsl_cordz_handle.so.2308.0.0 => /usr/lib/libabsl_cordz_handle.so.2308.0.0 (0x00007aedc7b91000)
libabsl_stacktrace.so.2308.0.0 => /usr/lib/libabsl_stacktrace.so.2308.0.0 (0x00007aedc7b8c000)
libabsl_kernel_timeout_internal.so.2308.0.0 => /usr/lib/libabsl_kernel_timeout_internal.so.2308.0.0 (0x00007aedc7b86000)
libabsl_malloc_internal.so.2308.0.0 => /usr/lib/libabsl_malloc_internal.so.2308.0.0 (0x00007aedc7b7f000)
libabsl_int128.so.2308.0.0 => /usr/lib/libabsl_int128.so.2308.0.0 (0x00007aedc7b78000)
libabsl_strings_internal.so.2308.0.0 => /usr/lib/libabsl_strings_internal.so.2308.0.0 (0x00007aedc7b70000)
libcap.so.2 => /usr/lib/libcap.so.2 (0x00007aedc7b64000)
libgcrypt.so.20 => /usr/lib/libgcrypt.so.20 (0x00007aedc7a1b000)
liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007aedc79f6000)
liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007aedc79c3000)
libzstd.so.1 => /usr/lib/libzstd.so.1 (0x00007aedc78ee000)
libp11-kit.so.0 => /usr/lib/libp11-kit.so.0 (0x00007aedc7758000)
libbrotlienc.so.1 => /usr/lib/libbrotlienc.so.1 (0x00007aedc76a6000)
libbrotlidec.so.1 => /usr/lib/libbrotlidec.so.1 (0x00007aedc7697000)
libidn2.so.0 => /usr/lib/libidn2.so.0 (0x00007aedc7675000)
libunistring.so.5 => /usr/lib/libunistring.so.5 (0x00007aedc74bb000)
libtasn1.so.6 => /usr/lib/libtasn1.so.6 (0x00007aedc74a2000)
libnettle.so.8 => /usr/lib/libnettle.so.8 (0x00007aedc744a000)
libhogweed.so.6 => /usr/lib/libhogweed.so.6 (0x00007aedc7401000)
libgmp.so.10 => /usr/lib/libgmp.so.10 (0x00007aedc735b000)
libabsl_symbolize.so.2308.0.0 => /usr/lib/libabsl_symbolize.so.2308.0.0 (0x00007aedc7353000)
libabsl_log_sink.so.2308.0.0 => /usr/lib/libabsl_log_sink.so.2308.0.0 (0x00007aedc734c000)
libabsl_crc32c.so.2308.0.0 => /usr/lib/libabsl_crc32c.so.2308.0.0 (0x00007aedc7346000)
libabsl_exponential_biased.so.2308.0.0 => /usr/lib/libabsl_exponential_biased.so.2308.0.0 (0x00007aedc7341000)
libabsl_debugging_internal.so.2308.0.0 => /usr/lib/libabsl_debugging_internal.so.2308.0.0 (0x00007aedc733b000)
libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007aedc7315000)
libffi.so.8 => /usr/lib/libffi.so.8 (0x00007aedc7308000)
libbrotlicommon.so.1 => /usr/lib/libbrotlicommon.so.1 (0x00007aedc72e5000)
libabsl_demangle_internal.so.2308.0.0 => /usr/lib/libabsl_demangle_internal.so.2308.0.0 (0x00007aedc72db000)
libabsl_crc_internal.so.2308.0.0 => /usr/lib/libabsl_crc_internal.so.2308.0.0 (0x00007aedc72d5000) ldd ~/Code/full-cloud-pinyin/target/release/fcp 02/17/24 08:08:27 AM
linux-vdso.so.1 (0x00007fffee114000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x000076f2c4200000)
libssl.so.3 => /usr/lib/libssl.so.3 (0x000076f2c4ca2000)
libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x000076f2c3c00000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x000076f2c45db000)
libm.so.6 => /usr/lib/libm.so.6 (0x000076f2c44ef000)
libc.so.6 => /usr/lib/libc.so.6 (0x000076f2c3a1e000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x000076f2c4da8000) |
Let me build on my machine first. I will search those libraries too. But if lib version gives problem need to change some codes on fcp and fcp-bridge . |
I just checked. 100% static link isn't possible with the dependencies I have in this project. So @khumnath, I think the best solution for you is to compile it yourselves. Let me know if there's anything I can help. |
@khumnath please use latest version of rust. |
did you manage to build? i think fcp is built with some warnings that is ok. main error is in fcitx5-bridge. there is something called protoc is older then expected in my machine. i have protoc version like this |
protoc buffer headers are define here explicitly |
Check this : qingxiang-jia/fcitx5-bridge#1 |
i managed to build with these steps installing other requirements
for rust with cargo
everithing is ok but input is not transliterating. |
Thanks for the effort. I will put this in the ReadMe so others have a better idea how to build it on Ubuntu. |
Also i have a fpc.desktop file created in ~/.config/autostart containing script to auto run fpc binary on every login |
No description provided.
The text was updated successfully, but these errors were encountered: