#! /usr/bin/env python
# coding:utf-8


# the number of loop for train IBM Model 2
loop_count = 10
phrase_model_file = "./phrase.model"
bigram_model_file = "./bigram.model"

if __name__ == '__main__':
    pass

@@ -32,16 +32,37 @@
 :utf-8%0A%0A
+from os import path%0A%0A
 %0A# the n
@@ -133,19 +133,74 @@
 _file = 
-%22./
+path.join(%0A    path.abspath(path.dirname(__file__)),%0A    %22
 phrase.m
@@ -205,16 +205,18 @@
 .model%22%0A
+)%0A
 bigram_m
@@ -231,11 +231,66 @@
 e = 
-%22./
+path.join(%0A    path.abspath(path.dirname(__file__)),%0A    %22
 bigr
@@ -298,16 +298,18 @@
 m.model%22
+%0A)
 %0A%0Aif __n
@@ -338,8 +338,240 @@
    p
-ass
+rint(%22%7B%7D = %7B%7D%22.format(%0A        %22loop_count%22,%0A        loop_count))%0A    print(%22%7B%7D = %7B%7D%22.format(%0A        %22phrase_model_file%22,%0A        phrase_model_file))%0A    print(%22%7B%7D = %7B%7D%22.format(%0A        %22bigram_model_file%22,%0A        bigram_model_file))
 %0A

Modify path to use __file__