mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-04 04:12:45 +00:00 
			
		
		
		
	Clean up
This commit is contained in:
		@@ -49,22 +49,6 @@ class CQiWrapper(CQiClient):
 | 
			
		||||
            self.attr_strings['struct_attrs'][struct_attr] = (self.corpus_name
 | 
			
		||||
                                                              + '.'
 | 
			
		||||
                                                              + struct_attr)
 | 
			
		||||
        # self.word_str = corpus_name + '.word'
 | 
			
		||||
        # self.lemma_str = corpus_name + '.lemma'
 | 
			
		||||
        # self.pos_str = corpus_name + '.pos'
 | 
			
		||||
        # self.sem_str = corpus_name + '.sem'
 | 
			
		||||
        # self.entry_str = corpus_name + '.entry'
 | 
			
		||||
        # self.entry_author_str = self.entry_str + '_author'
 | 
			
		||||
        # self.entry_title_str = self.entry_str + '_title'
 | 
			
		||||
        # self.attributes = [self.word_str,
 | 
			
		||||
        #                    self.lemma_str,
 | 
			
		||||
        #                    self.pos_str,
 | 
			
		||||
        #                    self.sem_str,
 | 
			
		||||
        #                    self.entry_str,
 | 
			
		||||
        #                    self.entry_author_str,
 | 
			
		||||
        #                    self.entry_title_str]
 | 
			
		||||
        # print(self.attributes)
 | 
			
		||||
 | 
			
		||||
    def set_corpus_name(self, corpus_name):
 | 
			
		||||
        self.corpus_name = corpus_name
 | 
			
		||||
 | 
			
		||||
@@ -223,21 +207,6 @@ class CQiWrapper(CQiClient):
 | 
			
		||||
                                 host=self.host, port=self.port)
 | 
			
		||||
        tmp_session.connect()
 | 
			
		||||
        match = self.get_cpos_info(index_pair, tmp_session)
 | 
			
		||||
        # tokens = tmp_session.cl_cpos2str(self.attr_strings['positional_attrs']['word'],
 | 
			
		||||
        #                                  range(index_pair[0],
 | 
			
		||||
        #                                        index_pair[1] + 1))
 | 
			
		||||
        # lemmas = tmp_session.cl_cpos2str(self.attr_strings['positional_attrs']['lemma'],
 | 
			
		||||
        #                                  range(index_pair[0],
 | 
			
		||||
        #                                        index_pair[1] + 1))
 | 
			
		||||
        # pos_tags = tmp_session.cl_cpos2str(self.attr_strings['positional_attrs']['pos'],
 | 
			
		||||
        #                                    range(index_pair[0],
 | 
			
		||||
        #                                          index_pair[1] + 1))
 | 
			
		||||
        # sem_tags = tmp_session.cl_cpos2str(self.attr_strings['positional_attrs']['sem'],
 | 
			
		||||
        #                                    range(index_pair[0],
 | 
			
		||||
        #                                          index_pair[1] + 1))
 | 
			
		||||
        # struc_entry = tmp_session.cl_cpos2struc(self.attr_strings['struct_attrs']['entry'],
 | 
			
		||||
        #                                         range(index_pair[0],
 | 
			
		||||
        #                                               index_pair[1] + 1))
 | 
			
		||||
        before_index = max([0, index_pair[0] - self.context_len])
 | 
			
		||||
        after_index = min([self.corpus_max_len,
 | 
			
		||||
                           index_pair[1] + self.context_len])
 | 
			
		||||
@@ -247,10 +216,6 @@ class CQiWrapper(CQiClient):
 | 
			
		||||
        context_after = tmp_session.cl_cpos2str(self.attr_strings['positional_attrs']['word'],
 | 
			
		||||
                                                range(index_pair[1] + 1,
 | 
			
		||||
                                                      after_index + 1))
 | 
			
		||||
        # entry_titles = tmp_session.cl_struc2str(self.attr_strings['struct_attrs']['entry_title'],
 | 
			
		||||
        #                                         struc_entry)
 | 
			
		||||
        # entry_authors = tmp_session.cl_struc2str(self.attr_strings['struct_attrs']['entry_author'],
 | 
			
		||||
        #                                          struc_entry)
 | 
			
		||||
        tmp_dict = {'context_before': context_before,
 | 
			
		||||
                    'context_after': context_after,
 | 
			
		||||
                    'cpos_start': index_pair[0],
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user