User:Eleanorg/2.1/Prototypes/transcription: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
Line 2: Line 2:


===make db of imgs waiting to be transcribed===
===make db of imgs waiting to be transcribed===
<source lang="python">
#!/usr/bin/python
#-*- coding:utf-8 -*-
import pymongo
from pymongo import Connection
#======== create db with img files
connection = Connection()
myDB = connection['consentTexts1']
collection = myDB.collection 
for x in range(0,11):
title = "text" + str(x)
fileName = "img" + str(x) + ".jpg"
sentence = {'title': title, 'file': fileName, 'status': "waiting", 'text':" " }
print sentence
collection.insert(sentence)
</source>


===input form===
===input form===

Revision as of 14:10, 21 September 2012

Asking people to transcribe text and submit it to a central document. Will they transcribe verbatim?

make db of imgs waiting to be transcribed

#!/usr/bin/python
#-*- coding:utf-8 -*-

import pymongo
from pymongo import Connection


#======== create db with img files

connection = Connection()
myDB = connection['consentTexts1']
collection = myDB.collection  

for x in range(0,11):
	title = "text" + str(x)
	fileName = "img" + str(x) + ".jpg"
	
	
	sentence = {'title': title, 'file': fileName, 'status': "waiting", 'text':" " }
	print sentence
	collection.insert(sentence)

input form

Show an img waiting to be transcribed, with input form for transcription.

proces input form

Change status of that img in db to 'finished'.


display transcribed texts

CGI displays an html doc of all transcribed db entries.