commited all contents created by participants

This commit is contained in:
Bachir Soussi Chiadmi
2017-12-21 18:12:40 +01:00
parent cefd1c2ad0
commit b936b1e616
2137 changed files with 1076319 additions and 730 deletions
+49
View File
@@ -0,0 +1,49 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# this programme compare a text in french and its translation in englishe and liste the common words .import codecs
import codecs
f = codecs.open("JVFR.txt", encoding='utf-8') # on précise lencodage à louverture
textFr = f.read() # txt est une unicode
nm =0
#with open("JVFR.txt", encoding='utf-8', "r") as textFr:
for line in textFr:
line=line.strip()
mots=line.split()
for mot in mots :
#mot=mot.strip(" ;''?:,()!.\").”-")
nm=nm+1
#print(mot)
print("nombres de mots en text francais = ", nm)
#
E = codecs.open("JVEN.txt", encoding='utf-8') # on précise lencodage à louverture
textEN = E.read() # txt est une unicode
nb =0
#with open("JVFR.txt", encoding='utf-8', "r") as textFr:
for line in textEN:
line=line.strip()
words=line.split()
for word in words :
#mot=mot.strip(" ;''?:,()!.\").”-")
nb=nb+1
#print(mot)
print("nombres de mots en text anglais = ", nb)
S = codecs.open("JVES.txt", encoding='utf-8') # on précise lencodage à louverture
textES = S.read() # txt est une unicode
nmb =0
#with open("JVFR.txt", encoding='utf-8', "r") as textFr:
for line in textES:
line=line.strip()
parabls=line.split()
for parabl in parabls:
#mot=mot.strip(" ;''?:,()!.\").”-")
nmb=nmb+1
#print(mot)
print("nombres de mots en text espagnol = ", nmb)