1
$\begingroup$

I would like to determine the number of text-blocks verifying a roughly similar pattern. I have the intuition that I could do it using some Discrete Fourier Transform (DFT)-like methodology.

Example:

Votre date de livraison estimée est : Mercredi 7 octobre 2015 - Vendredi 9 octobre 2015

Votre mode de livraison est : Livraison Rapide

Vos commandes Votre commande sera expédiée à :

M. X

120 Road Nowhere

Floor 1 Company Z

City, Zipcode

Country

Votre date de livraison estimée est : Mercredi 13 mai 2016 - Vendredi 1 juin 2016

Votre mode de livraison est : Livraison Rapide

Vos commandes Votre commande sera expédiée à :

Mrs ZZ

10, Street Paradise

Another city, another zipcode

Country2

Votre date de livraison estimée est : Mercredi 7 octobre 2010 - Vendredi 9 octobre 2011

Votre mode de livraison est : Livraison Rapide

Vos commandes Votre commande sera expédiée à :

M. YX

333, avenue WeirdName

Door 5 Start-up U

SF, ZIP

US

I want to determine that there are 3 blocks (the 3 info for delivery address Amazon-like).

I cannot rely rely on vocabulary (it is not necessarily this kind of text-content). The structure of the blocks is similar (+noise).

Can someone (in)validate this idea, and help me to develop it?

$\endgroup$
  • 1
    $\begingroup$ You may want to look at compression models, since this is what compression strives to do: identify similar text and store it minimally. $\endgroup$ – barrycarter Feb 24 '16 at 17:53
  • $\begingroup$ ORganizing and categorizing addresses is one of those near-impossible tasks, right up there with writing a time-date calculator that handles all calendar irregularities correctly. I recommend not even trying to create your own home-brew address filter. $\endgroup$ – Carl Witthoft Feb 25 '16 at 12:30
  • $\begingroup$ To precise further, I'm not interested in the "address" per se. I'm just wanting to extract / cut / cluster block of texts with similar structure. Here it will be 3 addresses (but I do not want / need to know these block of text are addresses!) $\endgroup$ – mic Feb 25 '16 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.