Metadata-Version: 2.4
Name: pycrea
Version: 0.1.3
Summary: A Python package to parse and manage CREA word vectors. Learn more about this project on GitHub: https://github.com/WiredBrains-Lab/
Home-page: https://github.com/askitowski1/CREA-Vectors/tree/main/crea_library
Author: Alex Skitowski
Author-email: Alex Skitowski <askitowski@mcw.edu>
License: MIT
Description-Content-Type: text/markdown
Requires-Dist: numpy
Requires-Dist: scikit-learn
Requires-Dist: scipy
Requires-Dist: pandas
Dynamic: author
Dynamic: home-page

# CREA-Vectors

This is a package to access CREA vectors via pycrea. Various data collection methods are also included.
Future updates will allow users to add their collected vectors to the main set.

## How to run the code
1. pip install pycrea in your terminal
2. In python import the library
   - from crea import CREA
   - c = CREA() # Automatically loads main dictionary or
   - c = CREA('path_to_file.json') # Load custom json file
      * c_cols = CREA(col_names = True) loads feature names 
   ### Usage
   - all_vectors = c.get_all_vectors()
   - vector = c.get_vector('word1')
   - vectors = c.get_vectors(['word1', 'word2'])
   - vectors_and_cols = c_cols.select_cols(['word1', 'word2'], [feature_1, feature_2])
   - similarity = c.cosine_similarity('word1', 'word2')
   - n_similar = c.top_n_similar('word1', 5) # defaults to 5

   
## PsychoPy Data Collection
- Results are saved as a JSON file named 'results.json'
- Currently it is overwritten each time
- JSON file has the structure {'target_word': {'Rating Category 1': rating_1, ... 'Rating Category n': rating_n}}
- CREA.get_raw('results.json') gets the new raw data from results.json and adds a new row to raw results.csv
- CREA.calculate_averages('results.csv') calculates the average of results.csv and returns a DataFrame of the averages
