Jump to content
Chinese-Forums
  • Sign Up

Anyway to convert a txt file or list into supermemo?


Shadowdh

Recommended Posts

I have not tried that.. I might do that later when I get a moment... I am using an HTC Kaiser/Vario III/TyTN II (it really as three names and more if you count the other variants), it runs on WM6 (or 6.1 as mine is) and is pretty good... well I think so at least... :mrgreen:

Link to comment
Share on other sites

I've done it before on a PC and it's pretty annoying but it possible.

I do it by converting everything into Q: and A: format. ie a long list like this

Q: what is 1 + 1?

A: it is 2

Q: what is 2+ 2?

A: it is 4

Q: etc?

A: etc.

if this is how your list is already formatted, but without the Q: and A: at the start of every line, then the Q and A can easily be added in a moment or two via excel & word

Link to comment
Share on other sites

Unfortunately, it is a bit difficult to help with Windows machines because they are basically unusable without expensive specialised software or extensive modification.

On a Unix or Mac machine, you can convert the files I posted to the format realmayo specified by executing the following two commands in the vi editor:

:%s/^/Q: /g

:%s/t/rA: /g

If you want, you can download the windows version of the vi editor here, use it to convert the files, then delete it, because it's a programmer's editor that most people feel uncomfortable with. But it comes installed by default on all Linux and Mac computers.

There is nothing on a regular Windows installation that does text processing, let alone regular expressions, so I can't be more helpful here.

Link to comment
Share on other sites

Haha, renzhe, unleashing vi on a self-described tech illiterate is cruel and unusual punishment :twisted:. At the very least, you should also tell him the commands:

:w

To save, and

:q

to quit. (which can be combined as :wq if you save and quit at the same time).

In any case, to save more hair tearing, here's the converted files, also in utf-8 format (does supermemo support this?).

Incidentally, search/replace with this regex will do the whole thing in one command, rather than two.

:%s/([^t]*)t(.*)/Q:1rA:2/g

smhsktables.zip

Link to comment
Share on other sites

Good grief guys, my head hurts... :mrgreen: I had a look at that site but I think I would need to do a bit of research before trying anything like that... (the vi site)...

Imron thanks a million mate... I will hopefully get a moment to see if those work tomorrow first thing... much appreciated...

Link to comment
Share on other sites

Hi there chaps and chapettes, I tried to import the list and while it says it imports the list comes up with no entries... now I have not doubt there is something I am not doing right... but for the life of me I cannot work it out. Thanks for all your help, I will keep trying...

Link to comment
Share on other sites

  • 4 weeks later...

i'm uploading the HSK A in supermemo Q: & A: format for you Shadowdh (and anyone else who wants them). They're in gb2312 encoding with the following formating:

Q: 阿
A: ā(āgē)
(pref) prefix used before kinship terms; (brother)

Q: 阿拉伯语
A: ālābóyǔ(ālābówén)
(n) Arabic

so the pinyin should come up in red and the answer in blue.

Just click on File --> Import --> Import Q & A

after the files finished importing, you'll have to open it and then click on Mode --> HTML

HSK A gb2312.txt

Link to comment
Share on other sites

  • 3 months later...

Hi all!

Is this working for you guys? The cards import for me, but characters and pinyin + tones show up as gibberish and question marks. I have this problem when importing to both supermemo and mnemosyne, so its probably a problem with my system. Off to hunt for chinese character display...

Link to comment
Share on other sites

Looks like I can't edit yet, sorry for double post.

In case anyone else was also struggling, I found an answer on the SM wiki that said SM can't recognize UTF-8 line breaks. The user recommended opening desired text with an internet browser, then copying and pasting into notepad and saving as UTF-8 and then importing. When I did this, it didn't work, so I instead saved as Unicode, and my import finally worked. The pinyin doesn't display properly (tones screw it up), but I don't mind manually fixing that, although I may play more with formatting...

Link to comment
Share on other sites

  • 4 weeks later...

For the Mnemosyne users (open source card review program that uses the SM2 scheduling algorithm):

You can export renzhe's database (thanks!) together with example sentences from dict.cn at http://shengci.wojas.nl/mnemosyne

I have never used Supermemo and I don't know what kind of formatting it supports, but I'm willing to add Supermemo support to this page if anyone can provide me with an example import file.

Cheers,

Konrad

Link to comment
Share on other sites

Adding CSV and TSV is trivial if I know how to escape newlines, which is essential for the way this page works (you define a template with which a question side and an answer side is generated).

Does Supermemo use 'n' to escape newlines and '' to escape ''? Does it support markup like bold, italic, font color and font size?

It's already possible to export all data to TSV, but this will not export the example sentences:

UTF-8: http://shengci.wojas.nl/export

Unicode-16 for Excel: http://shengci.wojas.nl/export?msexcel=1

Cheers,

Konrad

Link to comment
Share on other sites

Ah, if Supermemo supports this format it would be perfect:

Q: 阿
A: ā(āgē)
(pref) prefix used before kinship terms; (brother)

Q: 阿拉伯语
A: ālābóyǔ(ālābówén)
(n) Arabic

So for the mobile editions gb2312 and big5 versions are required? How archaic. Another option would be to use an & #1234; encoding of all non-ascii characters, would this have any adverse effects?

Link to comment
Share on other sites

Join the conversation

You can post now and select your username and password later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Click here to reply. Select text to quote.

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...