Python Forum
find and group similar words with re?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
find and group similar words with re?
#1
If i have 2 list of names

for example
list1 ="Augsburg II, Turkgucu Munchen,Bayern II, Burghausen, Memmingen, Wurzburger Kickers, Ansbach, Buchbach,Aschaffenburg, Schweinfurt ,Illertissen, Bamberg,Schalding, Bayreuth ,Aubstadt, Furth II ,Vilzing, Nurnberg II "

list2 ="Augsburg II,Turkgucu Munich,Bayern Munich II,Wacker Burghausen,Memmingen ,Kickers Würzburg,Aubstadt ,SpVgg Greuther Furth II,FV Illertissen, Eintracht Bamberg 2010,Schalding-Heining Passau, SpVgg Bayreuth,SpVgg Ansbach,TSV Buchbach,Viktoria Aschaffenburg , 1. FC Schweinfurt,Vilzing , 1. FC Norimberga II"

is there some re command to have in output the words that are similar and not equal?

list3 ="Turkgucu Munchen = Turkgucu Munich, Bayern II =Bayern Munich II, Wurzburger Kickers= Kickers Würzburg ... and so on "

i was searching for commands:
re.search(pattern, string, flags=0)
re.search(pattern, sequence).group()
Reply


Messages In This Thread
find and group similar words with re? - by cartonics - Oct-27-2023, 06:55 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  pandas pivot table: How to find count for each group in Index and Column JaneTan 0 3,451 Oct-23-2021, 04:35 AM
Last Post: JaneTan
  Generate a string of words for multiple lists of words in txt files in order. AnicraftPlayz 2 2,918 Aug-11-2021, 03:45 PM
Last Post: jamesaarr
  Sum similar items tester_V 3 2,060 Jun-29-2021, 06:58 AM
Last Post: tester_V
  Trying to find first 2 letter word in a list of words Oldman45 7 3,883 Aug-11-2020, 08:59 AM
Last Post: Oldman45
  Check text contains words similar to themes/topics (thesaurus) Bec 1 38,638 Jul-28-2020, 04:17 PM
Last Post: Larz60+
  Voynich search engine in python using dashes & dot totals to find Italian words Pleiades 3 3,630 Oct-10-2019, 10:04 PM
Last Post: Pleiades
  Create a function to find words of certain length ag4g 2 4,159 Apr-21-2019, 06:20 PM
Last Post: BillMcEnaney
  Python: if 'X' in 'Y' but with two similar strings as 'X' DreamingInsanity 6 3,978 Feb-01-2019, 01:28 PM
Last Post: buran
  Similar to Poker bluekade5050 1 38,028 Nov-14-2018, 04:46 PM
Last Post: j.crater
  Compare all words in input() to all words in file Trianne 1 2,825 Oct-05-2018, 06:27 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020