• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Location of Keyboard Database: Ubuntu Touch

Scheduled Pinned Locked Moved Support
5 Posts 2 Posters 1.1k Views 1 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L Offline
      Lukas_Wolfskin
      last edited by 10 Jan 2018, 14:35

      Hi Folks,
      I'm trying to work on the prediction of the keyboard, locally. Right now, only one ebook is being used to teach Presage it's suggestions: the picture of dorian gray (as set up on GitHub).

      I'd like to include two more texts, and indicate them on lines 28 and 29 respectively, based on this src.pro: https://github.com/ubports/keyboard-component/blob/master/plugins/en/src/src.pro#L28
      But... I'm totally lost as to where to find the files on the UT phone, and how to edit the program. I know where things need to go, but I can't find the location they need to go and I don't know how to change the code.

      The two texts I want to add are both from Project Gutenberg: War of the Worlds by H.G. Wells [ http://www.gutenberg.org/cache/epub/36/pg36.txt] for more grammar and vocabulary complexity, and the King James Bible [http://www.gutenberg.org/cache/epub/10/pg10.txt] for English idioms and phrases as well as grammar and vocabulary diversity. It''s a test, but my hunch is that it will provide better text prediction than only The Picture of Dorian Gray by Oscar Wilde alone.

      Thanks!

      1 Reply Last reply Reply Quote 0
      • T Offline
        tupp
        last edited by tupp 1 Oct 2018, 18:02 10 Jan 2018, 17:55

        Could the path be found in this file?:
        /var/lib/dpkg/info/libpresage-data.list

        On my phone, the contents of that file is:
        /.
        /etc
        /etc/presage.xml
        /usr
        /usr/share
        /usr/share/presage
        /usr/share/presage/abbreviations_it.txt
        /usr/share/presage/presage.png
        /usr/share/presage/database_it.db
        /usr/share/presage/abbreviations_en.txt
        /usr/share/presage/database_en.db
        /usr/share/doc
        /usr/share/doc/libpresage-data
        /usr/share/doc/libpresage-data/changelog.Debian.gz
        /usr/share/doc/libpresage-data/copyright

        I see that in /usr/share/doc/libpresage-data/copyright, the book is listed as "resources/the_picture_of_dorian_gray.txt".

        1 Reply Last reply Reply Quote 0
        • L Offline
          Lukas_Wolfskin
          last edited by 10 Jan 2018, 22:22

          Hey Tupp, thanks a ton.

          How did you get that list? When I plug my phone in, all I can browse/access is /home/phablet--and no hidden files. My phone is already in developer mode, and in read-write (using tweak tool).

          I've also tried poking around with adb shell, and navigating to a directory--but no hidden files are shown when I type ls.

          I'm kinda new--but I'm sure I can do something that allows my computer to browse my phone as root...

          Thanks!

          The txt files need to go into the same file as dorian gray... and I need to change how the program looks at them.

          T 1 Reply Last reply 11 Jan 2018, 00:51 Reply Quote 0
          • T Offline
            tupp @Lukas_Wolfskin
            last edited by tupp 1 Nov 2018, 00:52 11 Jan 2018, 00:51

            @Lukas_Wolfskin
            I don't remember how I found that file. I think I did a web search for "ubuntu touch presage" and also, just "presage".

            What is the "tweak tool" to which you refer? I seek new ways (other than "sudo mount -o remount,rw /" in adb shell) to write to the "read-only" partition.

            By the way, none of the files that I mentioned are "hidden," and the adb shell alone should allow you read-only access to those files.

            L 1 Reply Last reply 12 Jan 2018, 17:23 Reply Quote 0
            • L Offline
              Lukas_Wolfskin @tupp
              last edited by 12 Jan 2018, 17:23

              @tupp Thanks!

              I found the files and tried to execute the text2ngram commands to append the new .txt files I wanted, but with nol luck. The phone adb shell told me that i couldn't execute text2ngram because I needed to install presage...

              But... presage is already installed on both the computer and on the device. Ugh... I don't know.

              1 Reply Last reply Reply Quote 0
              2 out of 5
              • First post
                2/5
                Last post