Skip to content

social-comp/google-translate-minerva

Repository files navigation

google-translate-minerva

Description

Python files for translating social media posts on Weibo using Google Cloud API, gathering covid-19 related posts, samples of data

Getting Started

Dependencies

Python 3.9.5

How to Use

Follow the comments for where to replace files and create new files using the scripts. Run python scriptyouwanttorun.py

From googletranslate.py - Information for setting up Google Cloud API translator:

  1. python -m venv env

  2. Set your shell to use the venv paths for Python by activating the virtual environment.

    source env/bin/activate
    
    
  3. Now you can install packages without affecting other projects or your global Python installation

    pip install google-cloud-storage
    
    
  4. Create a key in google cloud and download the json. Use the path of the json file and run this in terminal Example-

export GOOGLE_APPLICATION_CREDENTIALS="/Users/sophiawang/path/hazel-airlock-3829443.json"

If you want to stop using the virtual environment and go back to your global Python, you can deactivate it:

deactivate

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages