<commit_before>#!/usr/bin/env python
# -*- coding: utf-8; -*-

"""Python prototype of polarity-aware `word2vec`.

USAGE:
word2vec_po;ar_proto.py [OPTIONS] seed_file input_file(s)

OPTIONS:
-d|--dimension -- dimensionality of learned vectors (-1)
-m|--min-freq -- minimal frequency of word to be considered
-w|--window -- size of context window

"""

##################################################################
# Imports
from __future__ import print_function
from evaluate import ENCODING, TAB_RE
from trie import normalize_string

from gensim.models import Word2Vec
import argparse
import codecs
import sys

##################################################################
# Classes
class IFiles(Object):
    """Auxiliary class for iterating over input lines.

    Instance variables:
    ifiles - list of input file names

    Methods:
    __init__ - class constructor
    __iter__ - iterator

    """

    def __init__(self, a_fnames):
        """Class constructor
<commit_msg>minor PEP8 change<commit_after>#!/usr/bin/env python
# -*- coding: utf-8; -*-

"""Python prototype of polarity-aware `word2vec`.

USAGE:
word2vec_po;ar_proto.py [OPTIONS] seed_file input_file(s)

OPTIONS:
-d|--dimension -- dimensionality of learned vectors (-1)
-m|--min-freq -- minimal frequency of word to be considered
-w|--window -- size of context window

"""

##################################################################
# Imports
from __future__ import print_function
from evaluate import ENCODING, TAB_RE
from trie import normalize_string

from gensim.models import Word2Vec
import argparse
import codecs
import sys


##################################################################
# Classes
class IFiles(Object):
    """Auxiliary class for iterating over input lines.

    Instance variables:
    ifiles - list of input file names

    Methods:
    __init__ - class constructor
    __iter__ - iterator

    """

    def __init__(self, a_fnames):
        """Class constructor

{'fraction_non_alphanumeric': 0.21807168096920748, 'fraction_numerical': 0.005552751135790005, 'mean_word_length': 4.2712765957446805, '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': '3605262', 'n_tokens_mistral': 571, 'n_tokens_neox': 542, 'n_words': 176}