From 0ed7481147b7f8287ed0073a12f6bd858e83d4c7 Mon Sep 17 00:00:00 2001 From: Shreyas Pimpalgaonkar Date: Sun, 20 Oct 2024 14:36:10 -0700 Subject: [PATCH] adding dedup test files --- py/core/examples/data_dedup/a1.txt | 7 +++++ py/core/examples/data_dedup/a10.txt | 31 +++++++++++++++++++ py/core/examples/data_dedup/a2.txt | 10 ++++++ py/core/examples/data_dedup/a3.txt | 6 ++++ py/core/examples/data_dedup/a4.txt | 7 +++++ py/core/examples/data_dedup/a5.txt | 14 +++++++++ py/core/examples/data_dedup/a6.txt | 29 ++++++++++++++++++ py/core/examples/data_dedup/a7.txt | 11 +++++++ py/core/examples/data_dedup/a8.txt | 17 +++++++++++ py/core/examples/data_dedup/a9.txt | 37 +++++++++++++++++++++++ py/core/pipes/kg/deduplication.py | 3 +- py/core/pipes/kg/deduplication_summary.py | 7 +++-- 12 files changed, 175 insertions(+), 4 deletions(-) create mode 100644 py/core/examples/data_dedup/a1.txt create mode 100644 py/core/examples/data_dedup/a10.txt create mode 100644 py/core/examples/data_dedup/a2.txt create mode 100644 py/core/examples/data_dedup/a3.txt create mode 100644 py/core/examples/data_dedup/a4.txt create mode 100644 py/core/examples/data_dedup/a5.txt create mode 100644 py/core/examples/data_dedup/a6.txt create mode 100644 py/core/examples/data_dedup/a7.txt create mode 100644 py/core/examples/data_dedup/a8.txt create mode 100644 py/core/examples/data_dedup/a9.txt diff --git a/py/core/examples/data_dedup/a1.txt b/py/core/examples/data_dedup/a1.txt new file mode 100644 index 000000000..cc83645af --- /dev/null +++ b/py/core/examples/data_dedup/a1.txt @@ -0,0 +1,7 @@ +Aristotle[A] (Greek: Ἀριστοτέλης Aristotélēs, pronounced [aristotélɛːs]; 384–322 BC) was an Ancient Greek philosopher and polymath. His writings cover a broad range of subjects spanning the natural sciences, philosophy, linguistics, economics, politics, psychology, and the arts. As the founder of the Peripatetic school of philosophy in the Lyceum in Athens, he began the wider Aristotelian tradition that followed, which set the groundwork for the development of modern science. + +Little is known about Aristotle's life. He was born in the city of Stagira in northern Greece during the Classical period. His father, Nicomachus, died when Aristotle was a child, and he was brought up by a guardian. At 17 or 18, he joined Plato's Academy in Athens and remained there until the age of 37 (c. 347 BC). Shortly after Plato died, Aristotle left Athens and, at the request of Philip II of Macedon, tutored his son Alexander the Great beginning in 343 BC. He established a library in the Lyceum, which helped him to produce many of his hundreds of books on papyrus scrolls. + +Though Aristotle wrote many elegant treatises and dialogues for publication, only around a third of his original output has survived, none of it intended for publication. Aristotle provided a complex synthesis of the various philosophies existing prior to him. His teachings and methods of inquiry have had a significant impact across the world, and remain a subject of contemporary philosophical discussion. + +Aristotle's views profoundly shaped medieval scholarship. The influence of his physical science extended from late antiquity and the Early Middle Ages into the Renaissance, and was not replaced systematically until the Enlightenment and theories such as classical mechanics were developed. He influenced Judeo-Islamic philosophies during the Middle Ages, as well as Christian theology, especially the Neoplatonism of the Early Church and the scholastic tradition of the Catholic Church. diff --git a/py/core/examples/data_dedup/a10.txt b/py/core/examples/data_dedup/a10.txt new file mode 100644 index 000000000..7d028ebd4 --- /dev/null +++ b/py/core/examples/data_dedup/a10.txt @@ -0,0 +1,31 @@ +Newton's "forced" motion corresponds to Aristotle's "violent" motion with its external agent, but Aristotle's assumption that the agent's effect stops immediately it stops acting (e.g., the ball leaves the thrower's hand) has awkward consequences: he has to suppose that surrounding fluid helps to push the ball along to make it continue to rise even though the hand is no longer acting on it, resulting in the Medieval theory of impetus.[45] + +Four causes +Main article: Four causes + +Aristotle argued by analogy with woodwork that a thing takes its form from four causes: in the case of a table, the wood used (material cause), its design (formal cause), the tools and techniques used (efficient cause), and its decorative or practical purpose (final cause).[47] +Aristotle suggested that the reason for anything coming about can be attributed to four different types of simultaneously active factors. His term aitia is traditionally translated as "cause", but it does not always refer to temporal sequence; it might be better translated as "explanation", but the traditional rendering will be employed here.[48][49] + +Material cause describes the material out of which something is composed. Thus the material cause of a table is wood. It is not about action. It does not mean that one domino knocks over another domino.[48] +The formal cause is its form, i.e., the arrangement of that matter. It tells one what a thing is, that a thing is determined by the definition, form, pattern, essence, whole, synthesis or archetype. It embraces the account of causes in terms of fundamental principles or general laws, as the whole (i.e., macrostructure) is the cause of its parts, a relationship known as the whole-part causation. Plainly put, the formal cause is the idea in the mind of the sculptor that brings the sculpture into being. A simple example of the formal cause is the mental image or idea that allows an artist, architect, or engineer to create a drawing.[48] +The efficient cause is "the primary source", or that from which the change under consideration proceeds. It identifies 'what makes of what is made and what causes change of what is changed' and so suggests all sorts of agents, non-living or living, acting as the sources of change or movement or rest. Representing the current understanding of causality as the relation of cause and effect, this covers the modern definitions of "cause" as either the agent or agency or particular events or states of affairs. In the case of two dominoes, when the first is knocked over it causes the second also to fall over.[48] In the case of animals, this agency is a combination of how it develops from the egg, and how its body functions.[50] +The final cause (telos) is its purpose, the reason why a thing exists or is done, including both purposeful and instrumental actions and activities. The final cause is the purpose or function that something is supposed to serve. This covers modern ideas of motivating causes, such as volition.[48] In the case of living things, it implies adaptation to a particular way of life.[50] +Optics +Further information: History of optics +Aristotle describes experiments in optics using a camera obscura in Problems, book 15. The apparatus consisted of a dark chamber with a small aperture that let light in. With it, he saw that whatever shape he made the hole, the sun's image always remained circular. He also noted that increasing the distance between the aperture and the image surface magnified the image.[51] + +Chance and spontaneity +Further information: Accident (philosophy) +According to Aristotle, spontaneity and chance are causes of some things, distinguishable from other types of cause such as simple necessity. Chance as an incidental cause lies in the realm of accidental things, "from what is spontaneous". There is also more a specific kind of chance, which Aristotle names "luck", that only applies to people's moral choices.[52][53] + +Astronomy +Further information: History of astronomy +In astronomy, Aristotle refuted Democritus's claim that the Milky Way was made up of "those stars which are shaded by the earth from the sun's rays," pointing out partly correctly that if "the size of the sun is greater than that of the earth and the distance of the stars from the earth many times greater than that of the sun, then... the sun shines on all the stars and the earth screens none of them."[54] He also wrote descriptions of comets, including the Great Comet of 371 BC.[55] + +Geology and natural sciences +Further information: History of geology + +Aristotle noted that the ground level of the Aeolian islands changed before a volcanic eruption. +Aristotle was one of the first people to record any geological observations. He stated that geological change was too slow to be observed in one person's lifetime.[56][57] The geologist Charles Lyell noted that Aristotle described such change, including "lakes that had dried up" and "deserts that had become watered by rivers", giving as examples the growth of the Nile delta since the time of Homer, and "the upheaving of one of the Aeolian islands, previous to a volcanic eruption."'[58] + +Meteorologica lends its name to the modern study of meteorology, but its modern usage diverges from the content of Aristotle's ancient treatise on meteors. The ancient Greeks did use the term for a range of atmospheric phenomena, but also for earthquakes and volcanic eruptions. Aristotle proposed that the cause of earthquakes was a gas or vapor (anathymiaseis) that was trapped inside the earth and trying to escape, following other Greek authors Anaxagoras, Empedocles and Democritus.[59] diff --git a/py/core/examples/data_dedup/a2.txt b/py/core/examples/data_dedup/a2.txt new file mode 100644 index 000000000..4b18e2141 --- /dev/null +++ b/py/core/examples/data_dedup/a2.txt @@ -0,0 +1,10 @@ +Aristotle was revered among medieval Muslim scholars as "The First Teacher", and among medieval Christians like Thomas Aquinas as simply "The Philosopher", while the poet Dante called him "the master of those who know". His works contain the earliest known formal study of logic, and were studied by medieval scholars such as Peter Abelard and Jean Buridan. Aristotle's influence on logic continued well into the 19th century. In addition, his ethics, although always influential, gained renewed interest with the modern advent of virtue ethics. + +Life +In general, the details of Aristotle's life are not well-established. The biographies written in ancient times are often speculative and historians only agree on a few salient points.[B] + +Aristotle was born in 384 BC[C] in Stagira, Chalcidice,[2] about 55 km (34 miles) east of modern-day Thessaloniki.[3][4] His father, Nicomachus, was the personal physician to King Amyntas of Macedon. While he was young, Aristotle learned about biology and medical information, which was taught by his father.[5] Both of Aristotle's parents died when he was about thirteen, and Proxenus of Atarneus became his guardian.[6] Although little information about Aristotle's childhood has survived, he probably spent some time within the Macedonian palace, making his first connections with the Macedonian monarchy.[7] + + +School of Aristotle in Mieza, Macedonia, Greece. +At the age of seventeen or eighteen, Aristotle moved to Athens to continue his education at Plato's Academy.[8] He probably experienced the Eleusinian Mysteries as he wrote when describing the sights one viewed at the Eleusinian Mysteries, "to experience is to learn" [παθείν μαθεĩν].[9] Aristotle remained in Athens for nearly twenty years before leaving in 348/47 BC. The traditional story about his departure records that he was disappointed with the Academy's direction after control passed to Plato's nephew Speusippus, although it is possible that he feared the anti-Macedonian sentiments in Athens at that time and left before Plato died.[10] Aristotle then accompanied Xenocrates to the court of his friend Hermias of Atarneus in Asia Minor. After the death of Hermias, Aristotle travelled with his pupil Theophrastus to the island of Lesbos, where together they researched the botany and zoology of the island and its sheltered lagoon. While in Lesbos, Aristotle married Pythias, either Hermias's adoptive daughter or niece. They had a daughter, whom they also named Pythias. In 343 BC, Aristotle was invited by Philip II of Macedon to become the tutor to his son Alexander.[11][12] diff --git a/py/core/examples/data_dedup/a3.txt b/py/core/examples/data_dedup/a3.txt new file mode 100644 index 000000000..6544955d7 --- /dev/null +++ b/py/core/examples/data_dedup/a3.txt @@ -0,0 +1,6 @@ +"Aristotle tutoring Alexander" by Jean Leon Gerome Ferris. +Aristotle was appointed as the head of the royal Academy of Macedon. During Aristotle's time in the Macedonian court, he gave lessons not only to Alexander but also to two other future kings: Ptolemy and Cassander.[13] Aristotle encouraged Alexander toward eastern conquest, and Aristotle's own attitude towards Persia was unabashedly ethnocentric. In one famous example, he counsels Alexander to be "a leader to the Greeks and a despot to the barbarians, to look after the former as after friends and relatives, and to deal with the latter as with beasts or plants".[13] By 335 BC, Aristotle had returned to Athens, establishing his own school there known as the Lyceum. Aristotle conducted courses at the school for the next twelve years. While in Athens, his wife Pythias died and Aristotle became involved with Herpyllis of Stagira. They had a son whom Aristotle named after his father, Nicomachus. If the Suda – an uncritical compilation from the Middle Ages – is accurate, he may also have had an erômenos, Palaephatus of Abydus.[14] + + +Portrait bust of Aristotle; an Imperial Roman (1st or 2nd century AD) copy of a lost bronze sculpture made by Lysippos. +This period in Athens, between 335 and 323 BC, is when Aristotle is believed to have composed many of his works.[12] He wrote many dialogues, of which only fragments have survived. Those works that have survived are in treatise form and were not, for the most part, intended for widespread publication; they are generally thought to be lecture aids for his students. His most important treatises include Physics, Metaphysics, Nicomachean Ethics, Politics, On the Soul and Poetics. Aristotle studied and made significant contributions to "logic, metaphysics, mathematics, physics, biology, botany, ethics, politics, agriculture, medicine, dance, and theatre."[15] diff --git a/py/core/examples/data_dedup/a4.txt b/py/core/examples/data_dedup/a4.txt new file mode 100644 index 000000000..b4fa4e233 --- /dev/null +++ b/py/core/examples/data_dedup/a4.txt @@ -0,0 +1,7 @@ +Near the end of his life, Alexander and Aristotle became estranged over Alexander's relationship with Persia and Persians. A widespread tradition in antiquity suspected Aristotle of playing a role in Alexander's death, but the only evidence of this is an unlikely claim made some six years after the death.[16] Following Alexander's death, anti-Macedonian sentiment in Athens was rekindled. In 322 BC, Demophilus and Eurymedon the Hierophant reportedly denounced Aristotle for impiety,[17] prompting him to flee to his mother's family estate in Chalcis, on Euboea, at which occasion he was said to have stated: "I will not allow the Athenians to sin twice against philosophy"[18][19][20] – a reference to Athens's trial and execution of Socrates. He died in Chalcis, Euboea[2][21][15] of natural causes later that same year, having named his student Antipater as his chief executor and leaving a will in which he asked to be buried next to his wife.[22] + +Theoretical philosophy +Logic +Main article: Term logic +Further information: Non-Aristotelian logic +With the Prior Analytics, Aristotle is credited with the earliest study of formal logic,[23] and his conception of it was the dominant form of Western logic until 19th-century advances in mathematical logic.[24] Kant stated in the Critique of Pure Reason that with Aristotle, logic reached its completion.[25] diff --git a/py/core/examples/data_dedup/a5.txt b/py/core/examples/data_dedup/a5.txt new file mode 100644 index 000000000..d8ebbd170 --- /dev/null +++ b/py/core/examples/data_dedup/a5.txt @@ -0,0 +1,14 @@ + +Organon +Main article: Organon + +Plato (left) and Aristotle in Raphael's 1509 fresco, The School of Athens. Aristotle holds his Nicomachean Ethics and gestures to the earth, representing his view in immanent realism, whilst Plato gestures to the heavens, indicating his Theory of Forms, and holds his Timaeus.[26][27] +Most of Aristotle's work is probably not in its original form, because it was most likely edited by students and later lecturers. The logical works of Aristotle were compiled into a set of six books called the Organon around 40 BC by Andronicus of Rhodes or others among his followers.[28] The books are: + +Categories +On Interpretation +Prior Analytics +Posterior Analytics +Topics +On Sophistical Refutations +The order of the books (or the teachings from which they are composed) is not certain, but this list was derived from analysis of Aristotle's writings. It goes from the basics, the analysis of simple terms in the Categories, the analysis of propositions and their elementary relations in On Interpretation, to the study of more complex forms, namely, syllogisms (in the Analytics)[29][30] and dialectics (in the Topics and Sophistical Refutations). The first three treatises form the core of the logical theory stricto sensu: the grammar of the language of logic and the correct rules of reasoning. The Rhetoric is not conventionally included, but it states that it relies on the Topics.[31] \ No newline at end of file diff --git a/py/core/examples/data_dedup/a6.txt b/py/core/examples/data_dedup/a6.txt new file mode 100644 index 000000000..b066488a3 --- /dev/null +++ b/py/core/examples/data_dedup/a6.txt @@ -0,0 +1,29 @@ +One of Aristotle's types of syllogism[D] +In words In +terms[E] In equations[F] + All men are mortal. + + All Greeks are men. + +∴ All Greeks are mortal. M a P + +S a M + +S a P +What is today called Aristotelian logic with its types of syllogism (methods of logical argument),[32] Aristotle himself would have labelled "analytics". The term "logic" he reserved to mean dialectics. + +Metaphysics +Main article: Metaphysics (Aristotle) +The word "metaphysics" appears to have been coined by the first century AD editor who assembled various small selections of Aristotle's works to the treatise we know by the name Metaphysics.[34] Aristotle called it "first philosophy", and distinguished it from mathematics and natural science (physics) as the contemplative (theoretikē) philosophy which is "theological" and studies the divine. He wrote in his Metaphysics (1026a16): + +if there were no other independent things besides the composite natural ones, the study of nature would be the primary kind of knowledge; but if there is some motionless independent thing, the knowledge of this precedes it and is first philosophy, and it is universal in just this way, because it is first. And it belongs to this sort of philosophy to study being as being, both what it is and what belongs to it just by virtue of being.[35] + +Substance +Further information: Hylomorphism +Aristotle examines the concepts of substance (ousia) and essence (to ti ên einai, "the what it was to be") in his Metaphysics (Book VII), and he concludes that a particular substance is a combination of both matter and form, a philosophical theory called hylomorphism. In Book VIII, he distinguishes the matter of the substance as the substratum, or the stuff of which it is composed. For example, the matter of a house is the bricks, stones, timbers, etc., or whatever constitutes the potential house, while the form of the substance is the actual house, namely 'covering for bodies and chattels' or any other differentia that let us define something as a house. The formula that gives the components is the account of the matter, and the formula that gives the differentia is the account of the form.[36][34] + +Immanent realism +Main article: Aristotle's theory of universals + +Plato's forms exist as universals, like the ideal form of an apple. For Aristotle, both matter and form belong to the individual thing (hylomorphism). +Like his teacher Plato, Aristotle's philosophy aims at the universal. Aristotle's ontology places the universal (katholou) in particulars (kath' hekaston), things in the world, whereas for Plato the universal is a separately existing form which actual things imitate. For Aristotle, "form" is still what phenomena are based on, but is "instantiated" in a particular substance.[34] diff --git a/py/core/examples/data_dedup/a7.txt b/py/core/examples/data_dedup/a7.txt new file mode 100644 index 000000000..72151c91a --- /dev/null +++ b/py/core/examples/data_dedup/a7.txt @@ -0,0 +1,11 @@ +Plato argued that all things have a universal form, which could be either a property or a relation to other things. When one looks at an apple, for example, one sees an apple, and one can also analyse a form of an apple. In this distinction, there is a particular apple and a universal form of an apple. Moreover, one can place an apple next to a book, so that one can speak of both the book and apple as being next to each other. Plato argued that there are some universal forms that are not a part of particular things. For example, it is possible that there is no particular good in existence, but "good" is still a proper universal form. Aristotle disagreed with Plato on this point, arguing that all universals are instantiated at some period of time, and that there are no universals that are unattached to existing things. In addition, Aristotle disagreed with Plato about the location of universals. Where Plato spoke of the forms as existing separately from the things that participate in them, Aristotle maintained that universals exist within each thing on which each universal is predicated. So, according to Aristotle, the form of apple exists within each apple, rather than in the world of the forms.[34][37] + +Potentiality and actuality +Concerning the nature of change (kinesis) and its causes, as he outlines in his Physics and On Generation and Corruption (319b–320a), he distinguishes coming-to-be (genesis, also translated as 'generation') from: + +growth and diminution, which is change in quantity; +locomotion, which is change in space; and +alteration, which is change in quality. + +Aristotle argued that a capability like playing the flute could be acquired – the potential made actual – by learning. +Coming-to-be is a change where the substrate of the thing that has undergone the change has itself changed. In that particular change he introduces the concept of potentiality (dynamis) and actuality (entelecheia) in association with the matter and the form. Referring to potentiality, this is what a thing is capable of doing or being acted upon if the conditions are right and it is not prevented by something else. For example, the seed of a plant in the soil is potentially (dynamei) a plant, and if it is not prevented by something, it will become a plant. Potentially, beings can either 'act' (poiein) or 'be acted upon' (paschein), which can be either innate or learned. For example, the eyes possess the potentiality of sight (innate – being acted upon), while the capability of playing the flute can be possessed by learning (exercise – acting). Actuality is the fulfilment of the end of the potentiality. Because the end (telos) is the principle of every change, and potentiality exists for the sake of the end, actuality, accordingly, is the end. Referring then to the previous example, it can be said that an actuality is when a plant does one of the activities that plants do.[34] diff --git a/py/core/examples/data_dedup/a8.txt b/py/core/examples/data_dedup/a8.txt new file mode 100644 index 000000000..3d5431ad4 --- /dev/null +++ b/py/core/examples/data_dedup/a8.txt @@ -0,0 +1,17 @@ +For that for the sake of which (to hou heneka) a thing is, is its principle, and the becoming is for the sake of the end; and the actuality is the end, and it is for the sake of this that the potentiality is acquired. For animals do not see in order that they may have sight, but they have sight that they may see.[38] + +In summary, the matter used to make a house has potentiality to be a house and both the activity of building and the form of the final house are actualities, which is also a final cause or end. Then Aristotle proceeds and concludes that the actuality is prior to potentiality in formula, in time and in substantiality. With this definition of the particular substance (i.e., matter and form), Aristotle tries to solve the problem of the unity of the beings, for example, "what is it that makes a man one"? Since, according to Plato there are two Ideas: animal and biped, how then is man a unity? However, according to Aristotle, the potential being (matter) and the actual one (form) are one and the same.[34][39] + +Epistemology +Aristotle's immanent realism means his epistemology is based on the study of things that exist or happen in the world, and rises to knowledge of the universal, whereas for Plato epistemology begins with knowledge of universal Forms (or ideas) and descends to knowledge of particular imitations of these.[31] Aristotle uses induction from examples alongside deduction, whereas Plato relies on deduction from a priori principles.[31] + +Natural philosophy +Aristotle's "natural philosophy" spans a wide range of natural phenomena including those now covered by physics, biology and other natural sciences.[40] In Aristotle's terminology, "natural philosophy" is a branch of philosophy examining the phenomena of the natural world, and includes fields that would be regarded today as physics, biology and other natural sciences. Aristotle's work encompassed virtually all facets of intellectual inquiry. Aristotle makes philosophy in the broad sense coextensive with reasoning, which he also would describe as "science". However, his use of the term science carries a different meaning than that covered by the term "scientific method". For Aristotle, "all science (dianoia) is either practical, poetical or theoretical" (Metaphysics 1025b25). His practical science includes ethics and politics; his poetical science means the study of fine arts including poetry; his theoretical science covers physics, mathematics and metaphysics.[40] + +Physics + +The four classical elements (fire, air, water, earth) of Empedocles and Aristotle illustrated with a burning log. The log releases all four elements as it is destroyed. +Main article: Aristotelian physics +Five elements +Main article: Classical element +In his On Generation and Corruption, Aristotle related each of the four elements proposed earlier by Empedocles, earth, water, air, and fire, to two of the four sensible qualities, hot, cold, wet, and dry. In the Empedoclean scheme, all matter was made of the four elements, in differing proportions. Aristotle's scheme added the heavenly aether, the divine substance of the heavenly spheres, stars and planets.[41] diff --git a/py/core/examples/data_dedup/a9.txt b/py/core/examples/data_dedup/a9.txt new file mode 100644 index 000000000..8c8c78983 --- /dev/null +++ b/py/core/examples/data_dedup/a9.txt @@ -0,0 +1,37 @@ +Aristotle's elements[41] +Element Hot/Cold Wet/Dry Motion Modern state +of matter +Earth Cold Dry Down Solid +Water Cold Wet Down Liquid +Air Hot Wet Up Gas +Fire Hot Dry Up Plasma +Aether (divine +substance) — Circular +(in heavens) Vacuum +Motion +Further information: History of classical mechanics +Aristotle describes two kinds of motion: "violent" or "unnatural motion", such as that of a thrown stone, in the Physics (254b10), and "natural motion", such as of a falling object, in On the Heavens (300a20). In violent motion, as soon as the agent stops causing it, the motion stops also: in other words, the natural state of an object is to be at rest,[42][G] since Aristotle does not address friction.[43] With this understanding, it can be observed that, as Aristotle stated, heavy objects (on the ground, say) require more force to make them move; and objects pushed with greater force move faster.[44][H] This would imply the equation[44] + +𝐹 += +𝑚 +𝑣 +{\displaystyle F=mv}, +incorrect in modern physics.[44] + +Natural motion depends on the element concerned: the aether naturally moves in a circle around the heavens,[I] while the 4 Empedoclean elements move vertically up (like fire, as is observed) or down (like earth) towards their natural resting places.[45][43][J] + + +Aristotle's laws of motion. In Physics he states that objects fall at a speed proportional to their weight and inversely proportional to the density of the fluid they are immersed in.[43] This is a correct approximation for objects in Earth's gravitational field moving in air or water.[45] +In the Physics (215a25), Aristotle effectively states a quantitative law, that the speed, v, of a falling body is proportional (say, with constant c) to its weight, W, and inversely proportional to the density,[K] ρ, of the fluid in which it is falling:;[45][43] + +𝑣 += +𝑐 +𝑊 +𝜌{\displaystyle v=c{\frac {W}{\rho }}} +Aristotle implies that in a vacuum the speed of fall would become infinite, and concludes from this apparent absurdity that a vacuum is not possible.[45][43] Opinions have varied on whether Aristotle intended to state quantitative laws. Henri Carteron held the "extreme view"[43] that Aristotle's concept of force was basically qualitative,[46] but other authors reject this.[43] + +Archimedes corrected Aristotle's theory that bodies move towards their natural resting places; metal boats can float if they displace enough water; floating depends in Archimedes' scheme on the mass and volume of the object, not, as Aristotle thought, its elementary composition.[45] + +Aristotle's writings on motion remained influential until the Early Modern period. John Philoponus (in Late antiquity) and Galileo (in Early modern period) are said to have shown by experiment that Aristotle's claim that a heavier object falls faster than a lighter object is incorrect.[40] A contrary opinion is given by Carlo Rovelli, who argues that Aristotle's physics of motion is correct within its domain of validity, that of objects in the Earth's gravitational field immersed in a fluid such as air. In this system, heavy bodies in steady fall indeed travel faster than light ones (whether friction is ignored, or not[45]), and they do fall more slowly in a denser medium.[44][L] diff --git a/py/core/pipes/kg/deduplication.py b/py/core/pipes/kg/deduplication.py index 79d7ba2d8..7a85a72ca 100644 --- a/py/core/pipes/kg/deduplication.py +++ b/py/core/pipes/kg/deduplication.py @@ -108,6 +108,7 @@ async def kg_named_entity_deduplication( collection_id=collection_id, extraction_ids=entity["extraction_ids"], document_ids=entity["document_ids"], + attributes={}, ) for name, entity in deduplicated_entities.items() ] @@ -118,7 +119,7 @@ async def kg_named_entity_deduplication( await self.kg_provider.add_entities( deduplicated_entities_list, table_name="entity_deduplicated", - # conflict_columns=["name", "collection_id"], + conflict_columns=["name", "collection_id", 'attributes'], ) return { diff --git a/py/core/pipes/kg/deduplication_summary.py b/py/core/pipes/kg/deduplication_summary.py index 1c3de3fea..434297a34 100644 --- a/py/core/pipes/kg/deduplication_summary.py +++ b/py/core/pipes/kg/deduplication_summary.py @@ -110,13 +110,14 @@ async def _prepare_and_upsert_entities( for i, entity in enumerate(entities_batch): entity.description_embedding = embeddings[i] entity.collection_id = collection_id - entity.extraction_ids = [] - entity.document_ids = [] + entity.attributes = {} + + print(entities_batch) result = await self.kg_provider.add_entities( entities_batch, table_name="entity_deduplicated", - # conflict_columns=["name", "collection_id"], + conflict_columns=["name", "collection_id", 'attributes'], ) logger.info(