<commit_before>
Intonation python module
------------------------

Homepage:
`https://github.com/gopalkoduri/intonation <https://github.com/gopalkoduri/intonation>`_

The intonation python module has broadly four classes:

-  **Intervals**: defines an object which has a set of intervals, of
   course! It has basic functions that facilitate the easy access to
   these intervals.
-  **Histogram**: defines a histogram object with methods used to find
   peaks using different methods and plot them.
-  *\* Pitch*\ \*: Given timestamps in seconds, and pitch values in
   cents, it defines a pitch object which has a number of methods which
   can be used to study the intervals
-  **Recording**: Given a pitch object, it defines a recording object
   which has methods to computer histogram, intonation profile and label
   sections of pitch contours with given set of intervals.


.. code:: python

    %pylab inline
    
    import intonation
    print dir(intonation)

.. parsed-literal::

    Populating the interactive namespace from numpy and matplotlib
    ['Histogram', 'Intervals', 'Pitch', 'Recording', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', 'pitch', 'recording', 'utils']


Load some data
--------------

A sample file with pitch data, and another file with just-intonation
intervals are included. The pitch in the file given is in cents scale,
normalized to tonic. If you don't have this, you should get it from
`https://github.com/gopalkoduri/intonation <https://github.com/gopalkoduri/intonation>`_,
or load your own data.

Make sure the data is formatted as a numpy array of mx2 size where m is
number of total points. The first column should corresponds to time
stamps in seconds and the second column should correspond to the pitch
value in cents. The given file is already formatted this way!

.. code:: python

    import pickle
    data = loadtxt("88d8196a-123a-4306-9856-4ce3faca14fc.txt")
    intervals = pickle.load(file("ji-intervals.pickle"))
Have a look at the data, it always does good!
---------------------------------------------


.. code:: python

    plot(data[52000:53000, 0], data[52000:53000, 1])<commit_msg>Minor changes to readme<commit_after>
Intonation python module
------------------------

Homepage:
`https://github.com/gopalkoduri/intonation <https://github.com/gopalkoduri/intonation>`_

The intonation python module has broadly four classes:

-  **Intervals**: defines an object which has a set of intervals, of
   course! It has basic functions that facilitate the easy access to
   these intervals.
-  **Histogram**: defines a histogram object with methods used to find
   peaks using different methods and plot them.
-  **Pitch**: Given timestamps in seconds, and pitch values in
   cents, it defines a pitch object which has a number of methods which
   can be used to study the intervals
-  **Recording**: Given a pitch object, it defines a recording object
   which has methods to computer histogram, intonation profile and label
   sections of pitch contours with given set of intervals.


.. code:: python

    %pylab inline
    
    import intonation
    print dir(intonation)

.. parsed-literal::

    Populating the interactive namespace from numpy and matplotlib
    ['Histogram', 'Intervals', 'Pitch', 'Recording', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', 'pitch', 'recording', 'utils']


Load some data
--------------

A sample file with pitch data, and another file with just-intonation
intervals are included. The pitch in the file given is in cents scale,
normalized to tonic. If you don't have this, you should get it from
`https://github.com/gopalkoduri/intonation <https://github.com/gopalkoduri/intonation>`_,
or load your own data.

Make sure the data is formatted as a numpy array of mx2 size where m is
number of total points. The first column should correspond to time
stamps in seconds and the second column should correspond to the pitch
value in cents (preferably normalized to tonic). The given file is already formatted this way!

.. code:: python

    import pickle
    data = loadtxt("88d8196a-123a-4306-9856-4ce3faca14fc.txt")
    intervals = pickle.load(file("ji-intervals.pickle"))
Have a look at the data!
------------------------


.. code:: python

    plot(data[52000:53000, 0], data[52000:53000, 1])
{'fraction_non_alphanumeric': 0.11442329740885118, 'fraction_numerical': 0.020178858060077964, 'mean_word_length': 3.478439425051335, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 8, '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': '162016', 'n_tokens_mistral': 1279, 'n_tokens_neox': 1201, 'n_words': 532}