export search history to text file

elsey.jack

Member
I would like to know what words I need to look up repeatedly so I can study them with SRS. I could figure this out if exporting my Pleco history as a text file was an option.
 

mikelove

皇帝
Staff member
You actually can export it to XML now (via the Settings screen), but it wouldn't help in this case because we don't log words in history multiple times; we simply update the date from the last time you looked up the word. This is of course another thing that we're in the process of fixing...
 

elsey.jack

Member
It looks like the XML export has a log of all clipboard reader searches though? That should work for my purposes because that function is the main way I look up words. I just need to use jieba or some other text segmenter to split things up before determining lookup frequencies...
 

mikelove

皇帝
Staff member
It only logs the most recent of those too, generally, though it also logs the full texts if you're just trying to look up what text you stuck in there.
 

elsey.jack

Member
The <entries source="reader" version="1"> section of the XML export file contains a two-month history of words looked up in the Clip Reader function.

Code:
<entry dc="0" di="1346454341" ei="34658560" t="1583334166"/>
<entry dc="0" di="1346454341" ei="30711040" t="1583334160"/>
<entry dc="0" di="1346454341" ei="32437760" t="1583334158"/>
<entry dc="0" di="1346454341" ei="24199168" t="1583334115"/>
<entry dc="0" di="1346454341" ei="32162304" t="1583334073"/>
<entry dc="0" di="1346585924" ei="14670080" t="1583334060"/>
<entry dc="0" di="1346454341" ei="21203712" t="1583334025"/>
<entry dc="0" di="1346454341" ei="23449344" t="1583334019"/>
<entry dc="0" di="1346454341" ei="31848448" t="1583333983"/>
t refers to the (most recent) Unix time that the word was queried. I assume di and ei are identifiers for the dictionary and entry.

I have several of these XML backup files saved and I'd like to use them to find holes in my vocabulary. May I ask some questions?
  1. The same word will have different entry identifiers in different dictionaries, correct?
  2. Would it be possible (even if just for the open-source dictionaries) to release some sort of database that lists the hanzi entry title corresponding to each entry identifier?
  3. Is it possible to look up entries in the Pleco app with just the entry identifier?
 

mikelove

皇帝
Staff member
1. Yes.

2. Not easily, to be honest - they're in an eclectic mix of different data files / formats and not all of them have IDs in a form where we can readily retrieve them.

But why not just create an XML file with just the unique items from this history, import that back in to Pleco, then dump it to a flashcard category with the 'dump to flashcards' command? (you could also hack around with the flashcard database format and create a bunch of flashcards with these IDs directly - flashcards use the same ID system that history does - or do likewise with a flashcard XML export file)

3. No, they're not meant to be that permanent / durable and we're generally trying not to encourage their more widespread use since we have on occasion thrown away the entire system and mapped everything to new IDs (and are poised to do the same in 4.0, actually).
 
Top