I would like to create a function who return a percentage of similitude between 2 texts extracting, the non-duplicate part in PHP.
Exemple :
Text 1
Paris was founded in the 3rd century BC by a Celtic people called the Parisii, who gave the city its name. By the 12th century, Paris was the largest city in the western world, a prosperous trading centre, and the home of the University of Paris, one of the first in Europe. In the 18th century, it was the centre stage for the French Revolution, and became an important centre of finance, commerce, fashion, science, and the arts, a position it still retains today.
Text 2
Paris was the largest city in the western world, a prosperous trading centre, and the home of the University of Paris, one of the first in Europe.
How can I not take into account the non-duplicated text.
With this exemple I would like to return 100% duplicate.