Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
class ScriptProcessing:
def __init__(self):
self.scene_Sentence_Map = open("sceneSentenceMap.txt", "r")
self.script = open("script.txt", "r")
self.scenes = []
self.sceneMap = []
self.sceneCount = 0
def extractScenes(self):
for line in self.scene_Sentence_Map:
mapLine = line.split(",")
scene = mapLine[0].split("\t")
scene = scene[0]
mapLine[0] = mapLine[0][len(scene):]
for i in range(0, len(mapLine) ):
mapLine[i] = mapLine[i].replace("[","")
mapLine[i] = mapLine[i].replace("\t","")
mapLine[i] = mapLine[i].replace(" ", "")
mapLine[i] = mapLine[i].replace("]", "")
mapLine[i] = mapLine[i].replace("\n", "")
self.sceneMap.append(mapLine)
self.sceneCount = self.sceneCount + 1
self.scenes = [""] * self.sceneCount
for i in range(self.sceneCount):
for j in range(len(self.sceneMap[i])):
self.scenes[i] = self.scenes[i] + self.script.readline()
return self.scenes