コード例 #1
0
import sys, langVector

if len(sys.argv) < 3:
	print("Error: missing arguments (language or source file with train plain text)")
elif len(sys.argv) < 4:
	vector_file = "language_vector.p"
	langVector.add_language_vector(sys.argv[1], sys.argv[2], vector_file)
else:
	langVector.add_language_vector(sys.argv[1], sys.argv[2], sys.argv[3])

コード例 #2
0
import langVector

langVector.add_language_vector("czech", "cs/train-cs.txt", "language_vector.p")
print("I have learned czech!")
langVector.add_language_vector("norwegian", "no/train-no.txt",
                               "language_vector.p")
print("I have learned norwegian!")
langVector.add_language_vector("english", "en/train-en.txt",
                               "language_vector.p")
print("I have learned english!")

langVector.add_language_vector("german", "de/train-de.txt",
                               "language_vector.p")
print("I have learned german!")

langVector.add_language_vector("french", "fr/train-fr.txt",
                               "language_vector.p")
print("I have learned french!")

langVector.add_language_vector("farsi", "fa/train-fa.txt", "language_vector.p")
print("I have learned farsi!")

langVector.add_language_vector("urdu", "ur/train-ur.txt", "language_vector.p")
print("I have learned urdu!")

langVector.add_language_vector("arabic", "ar/train-ar.txt",
                               "language_vector.p")
print("I have learned arabic!")
コード例 #3
0
import langVector

langVector.add_language_vector("czech", "cs/train-cs.txt", "language_vector.p")
print("I have learned czech!")
langVector.add_language_vector("norwegian", "no/train-no.txt", "language_vector.p")
print("I have learned norwegian!")
langVector.add_language_vector("english", "en/train-en.txt", "language_vector.p")
print("I have learned english!")

langVector.add_language_vector("german", "de/train-de.txt", "language_vector.p")
print("I have learned german!")

langVector.add_language_vector("french", "fr/train-fr.txt", "language_vector.p")
print("I have learned french!")

langVector.add_language_vector("farsi", "fa/train-fa.txt", "language_vector.p")
print("I have learned farsi!")

langVector.add_language_vector("urdu", "ur/train-ur.txt", "language_vector.p")
print("I have learned urdu!")

langVector.add_language_vector("arabic", "ar/train-ar.txt", "language_vector.p")
print("I have learned arabic!")

コード例 #4
0
import langVector

langVector.add_language_vector("czech", "cs/train-cs.txt", "language_vector.p")
langVector.add_language_vector("norwegian", "no/train-no.txt", "language_vector.p")
langVector.add_language_vector("english", "en/train-en.txt", "language_vector.p")
コード例 #5
0
import sys, langVector

if len(sys.argv) < 3:
    print(
        "Error: missing arguments (language or source file with train plain text)"
    )
elif len(sys.argv) < 4:
    vector_file = "language_vector.p"
    langVector.add_language_vector(sys.argv[1], sys.argv[2], vector_file)
else:
    langVector.add_language_vector(sys.argv[1], sys.argv[2], sys.argv[3])
コード例 #6
0
import langVector

langVector.add_language_vector("czech", "cs/train-cs.txt", "language_vector.p")
langVector.add_language_vector("norwegian", "no/train-no.txt",
                               "language_vector.p")
langVector.add_language_vector("english", "en/train-en.txt",
                               "language_vector.p")