Commit 2de6d995 authored by LiniEisha's avatar LiniEisha

resolving conflict issues

parent d1264422
from string import punctuation
import re
last_buffer = []
read_lines = [line.rstrip('\n') for line in open('java02.txt')]
my_save_data = open("output01.txt", "a")
for lines in read_lines:
re_make_lines = lines.split("[:;?{}]")
for items in re_make_lines:
if items.replace(" ", "") == "":
pass
else:
result = items.strip() + ".\r\n"
my_save_data.write(result)
my_save_data.close()
f1=open("java.txt.txt","r")
f2=open("output01.txt","r")
for line1 in f1:
for line2 in f2:
if line1==line2:
print("SAME\n")
else:
print(line1 + line2)
break
f1.close()
f2.close()
import nltk
from nltk.corpus import stopwords
from nltk.cluster.util import cosine_distance
import numpy as np
import networkx as nx
import re
#def read_article(file_name):
# file = open(file_name, "r")
# filedata = file.readlines()
# article = filedata[0].split(". ")
# sentences = []
# for sentence in article:
# print(sentence)
# sentences.append(sentence.replace("[^a-zA-Z]", " ").split(" "))
# sentences.pop()
# return sentences
sentences = "java.txt.txt is a general-purpose programming language that is class-based, object-oriented , and designed to have as few implementation dependencies as possible. It is intended to let application developers write once, run anywhere (WORA),meaning that compiled Java code can run on all platforms that support Java without the need for recompilation.Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of the underlying computer architecture. The syntax of Java is similar to C and C++, but it has fewer low-level facilities than either of them.`13"
sentences01 = "." + sentences
re.findall(r"([^.]*?java.txt.txt[^.]*\.)",sentences01)
Java is a general-purpose programming language that is class-based, object-oriented, and designed to have as few implementation dependencies as possible.
It is intended to let application developers write once, run anywhere (WORA),meaning that compiled Java code can run on all platforms that support Java without the need for recompilation.J
ava applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of the underlying computer architecture. T
he syntax of Java is similar to C and C++, but it has fewer low-level facilities than either of them.
public class Baby {
String name;
double weight = 5.0;
boolean isMale;
int numPoops = 0;
Baby[] siblings;
}
Java is a general-purpose programming language that is class-based, object-oriented, and designed to have as few implementation dependencies as possible. It is intended to let application developers write once, run anywhere (WORA),meaning that compiled Java code can run on all platforms that support Java without the need for recompilation.Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of the underlying computer architecture. The syntax of Java is similar to C and C++, but it has fewer low-level facilities than either of them.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment