public void parseFile(File file) throws IOException {

		// InputSource inputSource = null;
		if (!file.exists() || !file.isFile()) {
			throw new IOException("Given corpus file does not exist or is no file!");
		}
		try {
			InputSource inputSource = new InputSource(new BufferedReader(new FileReader(file)));

			XMLReader xmlReader = XMLReaderFactory.createXMLReader();

			XMLParser contentHandler = new XMLParser();
			xmlReader.setContentHandler(contentHandler);

			xmlReader.parse(inputSource);

			// if sentence is already in corpus --> just add frames TODO: test!
			for (Sentence NewSentence : contentHandler.getSentences()) {
				if (sentences.contains(NewSentence)) {
					Sentence sentenceInCorpus = getSentence(NewSentence.getId());
					for (Frame frame : NewSentence.getFrames()) {
						sentenceInCorpus.addFrame(frame);
					}
				} else {
					sentences.add(NewSentence);
				}
			}

		} catch (Exception e) {
			e.printStackTrace();
		}
	}