M1-Arborator-NaijaSUD/arborator/lib/treebankfiles.py
def readinallconll(projectname,conllfilepath,useFileInfo=True,eraseAllAnnos=False):
	"""
	all conll10 files found in the conllfilepath are read into the projectname database
	"""
	sql = database.SQL(projectname)
	annotatorName=sql.projectconfig["configuration"]["importAnnotatorName"]
	#print sql.cleanDatabase("output_D211.xml")
	files=os.listdir(conllfilepath)
	for i,infile in enumerate(files):
		print "\n\n________________________________________current file is: " + conllfilepath+infile,"file",i+1,"of",len(files)
		if infile.lower().endswith(".conll10")  or infile.lower().endswith("-dependanaly.txt") or infile.lower().endswith(".trees.conll14"):
			#enterConll(dbname,filename,annotatorName=None, eraseAllAnnos=False, dbtextname=None): 
			if useFileInfo:
				enterConll(projectname,conllfilepath+infile, eraseAllAnnos)
			else: # todo: correct:
				enterConll(projectname,conllfilepath+infile,annotatorName, eraseAllAnnos)
			print "ok"

	all conll10 files found in the conllfilepath are read into the projectname database
	
all conll10 files found in the conllfilepath are read into the projectname database
all conll10 files found in the conllfilepath are read into the projectname database
def readinallconll(projectname,conllfilepath,useFileInfo=True,eraseAllAnnos=False):
	sql = database.SQL(projectname)
	annotatorName=sql.projectconfig["configuration"]["importAnnotatorName"]
	files=os.listdir(conllfilepath)
	for i,infile in enumerate(files):
		print "\n\n________________________________________current file is: " + conllfilepath+infile,"file",i+1,"of",len(files)
		if infile.lower().endswith(".conll10")  or infile.lower().endswith("-dependanaly.txt") or infile.lower().endswith(".trees.conll14"):
			if useFileInfo:
				enterConll(projectname,conllfilepath+infile, eraseAllAnnos)
			else: 
				enterConll(projectname,conllfilepath+infile,annotatorName, eraseAllAnnos)
			print "ok"
def readinallconll ( projectname , conllfilepath , useFileInfo = True , eraseAllAnnos = False ) : sql = database . SQL ( projectname ) annotatorName = sql . projectconfig [ "configuration" ] [ "importAnnotatorName" ] files = os . listdir ( conllfilepath ) for i , infile in enumerate ( files ) : print "\n\n________________________________________current file is: " + conllfilepath + infile , "file" , i + 1 , "of" , len ( files ) if infile . lower ( ) . endswith ( ".conll10" ) or infile . lower ( ) . endswith ( "-dependanaly.txt" ) or infile . lower ( ) . endswith ( ".trees.conll14" ) : if useFileInfo : enterConll ( projectname , conllfilepath + infile , eraseAllAnnos ) else : enterConll ( projectname , conllfilepath + infile , annotatorName , eraseAllAnnos ) print "ok"
all conll10 files found in the conllfilepath are read into the projectname database
all conll10 files found in the conllfilepath are read into the projectname database
"""
	all conll10 files found in the conllfilepath are read into the projectname database
	""" #print sql.cleanDatabase("output_D211.xml") #enterConll(dbname,filename,annotatorName=None, eraseAllAnnos=False, dbtextname=None):  # todo: correct:
projectname
conllfilepath
useFileInfo
eraseAllAnnos