<commit_before>import os
import sys
import urlparse
import logging
import traceback
import subprocess
from collections import defaultdict
from loader import Loader, LoadResult, Timeout, TimeoutError

TCPLOADER = os.path.join(os.path.dirname(__file__), 'tcp_loader/tcp_loader')


class TCPLoader(Loader):
    '''Subclass of :class:`Loader` that loads pages using PhantomJS.
    
    .. note:: The :class:`PhantomJSLoader` currently does not support HTTP2.
    .. note:: The :class:`PhantomJSLoader` currently does not support local caching.
    .. note:: The :class:`PhantomJSLoader` currently does not support disabling network caching.
    .. note:: The :class:`PhantomJSLoader` currently does not support single-object loading (i.e., it always loads the full page).
    '''

    def __init__(self, **kwargs):
        super(TCPLoader, self).__init__(**kwargs)
        if self._full_page:
            raise NotImplementedError('TCPLoader does not support loading full pages.')
        if self._http2:
            raise NotImplementedError('TCPLoader does not support HTTP2')<commit_msg>Fixex copy+paste errors in TCPLoader docs<commit_after>import os
import sys
import urlparse
import logging
import traceback
import subprocess
from collections import defaultdict
from loader import Loader, LoadResult, Timeout, TimeoutError

TCPLOADER = os.path.join(os.path.dirname(__file__), 'tcp_loader/tcp_loader')


class TCPLoader(Loader):
    '''Subclass of :class:`Loader` that loads pages using custom executable so we can change TCP settings.
    
    .. note:: The :class:`TCPLoader` currently does not support HTTP2.
    .. note:: The :class:`TCPLoader` currently does not support local caching.
    .. note:: The :class:`TCPLoader` currently does not support disabling network caching.
    .. note:: The :class:`TCPLoader` currently does not support single-object loading (i.e., it always loads the full page).
    '''

    def __init__(self, **kwargs):
        super(TCPLoader, self).__init__(**kwargs)
        if self._full_page:
            raise NotImplementedError('TCPLoader does not support loading full pages.')
        if self._http2:
            raise NotImplementedError('TCPLoader does not support HTTP2')
{'fraction_non_alphanumeric': 0.09259259259259259, 'fraction_numerical': 0.0027100271002710027, 'mean_word_length': 3.9552572706935125, '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': '7186145', 'n_tokens_mistral': 628, 'n_tokens_neox': 618, 'n_words': 215}