This repository has been created by Elmo Geeraerts for the final assignment of an introductory class on python.
The repository contains:
- The
README.mdfile which describes the repository and illustrates how to use the code as a module and by running the script; - The
tutorial.mdandtutorial.ipynbfiles which show how to actually use the code and the different functionalities; - The
Example_English.xlsxandExample_Dutch.xlsxfiles you can use during the tutorial when you import the code. You could also write and use your own file. How to write your own file using the script is also explained in the tutorial; - The
vendor_data.pyfile, i.e. the actual python script that can be run or imported as a module.
Clone this repository with the following git command in the console (or download the ZIP file via GitHub):
git clone https://github.com/ElmoGeeraerts/intro_machine_learning_using_python.gitYou can import the script as a module by adding the repository to your path in a Python script or interactive notebook and then calling import.
import sys
sys.path.append('/path/to/intro_machine_learning_using_python')
import vendor_data as vdCheck out tutorial.md to see an example of the different functionalities of the script!
You can also run the script directly with the following code in a console:
python vendor_data.py -a/--addto add a vendor. You will be prompted with some questions to input the data. Or you can run:
python vendor_data.py -m/--modifyto modify a vendor. Again you will be prompted with some questions to input the data.
Or in Jupyter notebook with:
%run vendor_data.py -a/--addOR
%run vendor_data.py -m/--modifyFor more information you can run the command below, or check in the notebook tuturial.ipynb in this repository under "Running vendor_data.py".
python vendor_data.py --helpThis script is supposed to help translation project managers with keeping a clear overview of the vendors working on the a particular project. The script allows the project manager to:
- Easily create an excel file with the project name and the source language as filename;
- Write the following data to the excel file: the target language and the translator's name, e-mail, word rate, preferred CAT tool and the status of the translator;
- Modify the following data for the vendors already in the excel file: e-mail, word rate, preferred CAT tool and status. The main advantage of this script is that it limits the posibilities of CAT tools and statuses and that it validates e-mail and word rate (betw. 0.01 and 0.15). This prevents the excel file from becoming messy when different people are working on the project.
There are limits to this script that - with more practice, knowledge and time - might be resolved in the form of new functionalities. With this script you CANNOT:
- Look up vendors or information for vendors in the excel file
- Read other excel files and instantiating the class VendorData based on the information in those excel files
- Check if a vendor already exists in the excel file when the method ToExcel() is called multiple times
- Delete vendors from the file
- Modify multiple keys in a dictionary if the script is imported as a module.