<commit_before># -*- coding: utf-8 -*-

"""
Class for dealing with POS data.
"""

from .. import utils
from ..reader import TaggerReader

class POSReader(TaggerReader):
    """
    This class reads data from a POS corpus and turns it into a format
    readable by the neural network for the POS tagging task.
    """
    
    def __init__(self, md=None, sentences=None, filename=None):
        """
        :param tagged_text: a sequence of tagged sentences. Each sentence must be a 
            sequence of (token, tag) tuples. If None, the sentences are read from the 
            default location.
        """
        self.md = md
        self.task = 'pos'
        self.rare_tag = None
                
        self._set_metadata(md)
                <commit_msg>minor cleaning<commit_after># -*- coding: utf-8 -*-

"""
Class for dealing with POS data.
"""

from ..reader import TaggerReader

class POSReader(TaggerReader):
    """
    This class reads data from a POS corpus and turns it into a format
    readable by the neural network for the POS tagging task.
    """
    
    def __init__(self, md=None, sentences=None, filename=None):
        """
        :param tagged_text: a sequence of tagged sentences. Each sentence must be a 
            sequence of (token, tag) tuples. If None, the sentences are read from the 
            default location.
        """
        self.md = md
        self.task = 'pos'
        self.rare_tag = None
                
        self._set_metadata(md)
                
{'fraction_non_alphanumeric': 0.08885941644562334, 'fraction_numerical': 0.001326259946949602, 'mean_word_length': 1.994047619047619, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5415196', 'n_tokens_mistral': 423, 'n_tokens_neox': 399, 'n_words': 160}