public List<String> ExtractFromStream(InputStream is, int minLength) throws XMLStreamException, IOException {
        List<String> lines = Lists.newArrayList();
        XMLStreamReader staxXmlReader = XMLInputFactory.newInstance().createXMLStreamReader(is);
        List<String> line = Lists.newArrayList();
        for (int event = staxXmlReader.next(); event != XMLStreamConstants.END_DOCUMENT; event = staxXmlReader.next()) {
            switch (event) {
                case XMLStreamConstants.START_ELEMENT:
                    String elName = staxXmlReader.getLocalName();
                    if (elName.equals("s")) {
                        String sentence = Joiner.on(" ").join(line)
                                .replaceAll("[\"\\(\\)+-]", "")
                                .replaceAll("([*]|[#]|[{]).+?([*]|[#]|[}])", " ")
                                .replaceAll("'[ ]+", "'")
                                .replaceAll("[.]+", ".")
                                .replaceAll("( )([,.?!])", "$2").trim();
                        if (sentence.length() >= minLength)
                            lines.add(sentence);
                        line = Lists.newArrayList();
                    }
                    if (elName.equals("w")) {
                        line.add(staxXmlReader.getElementText().trim());
                    }
                    break;
                case XMLStreamConstants.END_ELEMENT:
                    break;
                default:
                    break;
            }
        }
        return lines;
    }