Skip to content
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

Generating json files for the Knowledge Map and related files #3

Open
wmgraham1 opened this issue Jan 11, 2013 · 1 comment
Open

Generating json files for the Knowledge Map and related files #3

wmgraham1 opened this issue Jan 11, 2013 · 1 comment
Assignees

Comments

@wmgraham1
Copy link
Owner

KA-Lite has json files for the knowledge map, the exercises and the videos.
2 locations of such files are:
- ka-lite\kalite\static\data
- ka-lite\kalite\static\data\topicdata

The idea is to make sure the Knowlege Map (including drill downs), the exercise names on the exercise page, the video links on the exercise page, etc., all are working correctly with the translated version.

We would like to have the system generate each of the appliocable json files in each language.

We have a tool to handle the translation of the Knowledge Map Topics into various languages. Ideally, we will use these translations to populate the json files for the applicable language.

Due to an upcoming demo to Khan Academy, we want to have the json file have at least the top level of Math and all the visible parts down to the Topic Areas in Arithmetic and Pre-Algebra and the details inside at least Topic Areas: Decimals, Fractions and maybe Percents in many languages by around 20 January. Is the easiest way to accomplish this to tokenize the applicable parts of the json files for these 3 topic areas and the higher level hierarchical elements?

We should make sure we have a good understanding of the purpose and source for all the json elements as well as all the places the json files are used. Someone at ka-lite should provide us this info.

@ghost ghost assigned alfonsodev Jan 11, 2013
@alfonsoabad
Copy link

I've been investigating and I found this script /kalite/utils/topycs.py that loads all topic data from the khan api http://www.khanacademy.org/api/v1/topictree
then filters some fields and creates the nested structure of the knowledge maps and dumps it to these files

  • /static/data/topics.json and
  • /static/data/nodecache.json

as far as I understood that's how it generates the knowledge map for ka-lite

Now I'm wondering how to proceed, I think that all the data needed for the generation of translated knoledge map, should be already the datastore but I'm still not familiar with the current structure of the edutry datastore.

We need to find how to match that data with the following attributes coming from the api .

attribute_whitelists = {
    "Topic": ["kind", "hide", "description", "id", "topic_page_url", "title", "extended_slug", "children"],
    "Video": ["kind", "description", "title", "duration", "keywords", "youtube_id", "download_urls", "readable_id"],
    "Exercise": ["kind", "description", "related_video_readable_ids", "display_name", "live", "name", "seconds_per_fast_problem", "prerequisites"]
}

We need kind of this example sql query to make against the edutry datastore.

SELECT Topic.description, Topic.title, Exercise.description, Exercise.display_name, Video.description, Video.title
FROM Topic LEFT JOIN Exercise ON ( Topic.xxxx = Exercise.yyyyy)
LEFT JOIN Video ON (Video.xxx = Topic.yyyyy)   
WHERE language LIKE 'spanish' AND Topic.id like 'basic_addition'

Having this data ready to matching with the Topic.id the rest should be a piece of cake if we can reuse the utils/topycs.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants