public static void main(String[] args) throws IOException {
//initialization
SourceLoader sourceLoader = new SourceLoader();
Translator translator = new Translator(new URLSourceProvider());
Scanner scanner = new Scanner(System.in);
System.out.println("Type <exit> or enter the path to a file that need to be translated: ");
String command = scanner.next();
while (!"exit".equals(command)) {
// So, the only way to stop the application is to do that manually or type "exit"
// paths:
// /home/av/Downloads/1.txt
// https://dl.dropboxusercontent.com/u/14434019/en.txt
try {
String source = sourceLoader.loadSource(command);
String translation = translator.translate(source);
System.out.println("Original: " + source);
System.out.println("Translation: " + translation);