<commit_before>#!/usr/bin/env python3

import sys
import os
import time
import random

#variables for alphabetic characters 
a_ = 65
z_ = 90
A_ = 97
Z_ = 122

#variables for accessing word_analysis list
WORDCOUNT   = 0
LINENUMBERS = 1
IWORDINTEXT = 2
ICHARONLINE = 3

#UNUSED
#ICHARINTEXT = 4

#variables for user input options in text_step and word_step functions
ENTER = ''
W_NEXT_INST = '>'
W_PREV_INST = '<'
INSTRUCTIONS = 'qa'
YES = NEXT_LINE = 1
NO = QUIT = FIRST = 0
NOMOVE = -1

"""
<NAME>

Text Analyzer (word counts, number of words between instances of a given word) 
and Basic Text Viewer
ver 2.0

-Dictionary and Word Frequency

-Step-through-text-viewer:
    Steps through text x lines at a time (1 by default), displays line number
    jumps to specific lines,
    skips to specific instances of a chosen word 
    at/after or at/before current line position (forwards and backwards)
        displays the word instance's position/index in the text,
        displays number of words skipped (forwards or backwards)
    If end of file reached 
    (either through a line skip or through an attempt to step forward after 
    the last instance of a word has already been reached),
    exits (prompts to enter a new word to "track"),<commit_msg>very rough basic Markov test, ThinkPython Markov algorithm-based<commit_after>#!/usr/bin/env python3

import sys
import os
import time
import random

#variables for alphabetic characters 
a_ = 65
z_ = 90
A_ = 97
Z_ = 122

#variables for accessing word_analysis list
WORDCOUNT   = 0
LINENUMBERS = 1
IWORDINTEXT = 2
ICHARONLINE = 3

#UNUSED
#ICHARINTEXT = 4

#variables for user input options in text_step and word_step functions
ENTER = ''
W_NEXT_INST = '>'
W_PREV_INST = '<'
INSTRUCTIONS = 'qa'
YES = NEXT_LINE = 1
NO = QUIT = FIRST = 0
NOMOVE = -1

"""
<NAME>

Text Analyzer (word counts, number of words between instances of a given word) 
and Markov basic test
ver 2.0

-Dictionary and Word Frequency

-Step-through-text-viewer:
    Steps through text x lines at a time (1 by default), displays line number
    jumps to specific lines,
    skips to specific instances of a chosen word 
    at/after or at/before current line position (forwards and backwards)
        displays the word instance's position/index in the text,
        displays number of words skipped (forwards or backwards)
    If end of file reached 
    (either through a line skip or through an attempt to step forward after 
    the last instance of a word has already been reached),
    exits (prompts to enter a new word to "track"),
{'fraction_non_alphanumeric': 0.06242684354272337, 'fraction_numerical': 0.016387046429964885, 'mean_word_length': 3.6032315978456015, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1988478', 'n_tokens_mistral': 831, 'n_tokens_neox': 766, 'n_words': 356}