import codecs, re
from sections import Section, SectionFactory



class WebOfScienceSectionFactory(SectionFactory):


    def __init__(self, text_file, fact_file, sect_file, fact_type, language, verbose=False):

        SectionFactory.__init__(self, text_file, fact_file, sect_file, fact_type, language)
        self.sections = []
        self.text = codecs.open(self.text_file, encoding='utf-8').read()

    def make_sections(self):
        
        re_STRUCTURE = re.compile("STRUCTURE TYPE=\"ABSTRACT\" START=(\d+) END=(\d+)")
        for line in open(self.fact_file):
            result = re_STRUCTURE.match(line)
            if result is not None:
                start, end = result.groups()
                section = Section()
                section.start_index = int(start)
                section.end_index = int(end)
                section.text = self.text[section.start_index:section.end_index]
                section.types.append('ABSTRACT')
                self.sections.append(section)

4e2b760f1a6d8ea94d89bae4ee7b56970c4f3df8
<mask token>


class WebOfScienceSectionFactory(SectionFactory):
    <mask token>
    <mask token>

<mask token>


class WebOfScienceSectionFactory(SectionFactory):
    <mask token>

    def make_sections(self):
        re_STRUCTURE = re.compile(
            'STRUCTURE TYPE="ABSTRACT" START=(\\d+) END=(\\d+)')
        for line in open(self.fact_file):
            result = re_STRUCTURE.match(line)
            if result is not None:
                start, end = result.groups()
                section = Section()
                section.start_index = int(start)
                section.end_index = int(end)
                section.text = self.text[section.start_index:section.end_index]
                section.types.append('ABSTRACT')
                self.sections.append(section)

<mask token>


class WebOfScienceSectionFactory(SectionFactory):

    def __init__(self, text_file, fact_file, sect_file, fact_type, language,
        verbose=False):
        SectionFactory.__init__(self, text_file, fact_file, sect_file,
            fact_type, language)
        self.sections = []
        self.text = codecs.open(self.text_file, encoding='utf-8').read()

    def make_sections(self):
        re_STRUCTURE = re.compile(
            'STRUCTURE TYPE="ABSTRACT" START=(\\d+) END=(\\d+)')
        for line in open(self.fact_file):
            result = re_STRUCTURE.match(line)
            if result is not None:
                start, end = result.groups()
                section = Section()
                section.start_index = int(start)
                section.end_index = int(end)
                section.text = self.text[section.start_index:section.end_index]
                section.types.append('ABSTRACT')
                self.sections.append(section)

import codecs, re
from sections import Section, SectionFactory


class WebOfScienceSectionFactory(SectionFactory):

    def __init__(self, text_file, fact_file, sect_file, fact_type, language,
        verbose=False):
        SectionFactory.__init__(self, text_file, fact_file, sect_file,
            fact_type, language)
        self.sections = []
        self.text = codecs.open(self.text_file, encoding='utf-8').read()

    def make_sections(self):
        re_STRUCTURE = re.compile(
            'STRUCTURE TYPE="ABSTRACT" START=(\\d+) END=(\\d+)')
        for line in open(self.fact_file):
            result = re_STRUCTURE.match(line)
            if result is not None:
                start, end = result.groups()
                section = Section()
                section.start_index = int(start)
                section.end_index = int(end)
                section.text = self.text[section.start_index:section.end_index]
                section.types.append('ABSTRACT')
                self.sections.append(section)

import codecs, re
from sections import Section, SectionFactory



class WebOfScienceSectionFactory(SectionFactory):


    def __init__(self, text_file, fact_file, sect_file, fact_type, language, verbose=False):

        SectionFactory.__init__(self, text_file, fact_file, sect_file, fact_type, language)
        self.sections = []
        self.text = codecs.open(self.text_file, encoding='utf-8').read()

    def make_sections(self):
        
        re_STRUCTURE = re.compile("STRUCTURE TYPE=\"ABSTRACT\" START=(\d+) END=(\d+)")
        for line in open(self.fact_file):
            result = re_STRUCTURE.match(line)
            if result is not None:
                start, end = result.groups()
                section = Section()
                section.start_index = int(start)
                section.end_index = int(end)
                section.text = self.text[section.start_index:section.end_index]
                section.types.append('ABSTRACT')
                self.sections.append(section)
