badman3000
New Member
- Joined
- Jul 1, 2019
- Messages
- 5
It would be incredibly helpful if someone could help me solve this problem.
I have a list of alternate spellings of words (Column B), coupled with a unique number (Column A)
Essentially I need a list of all the alternate spellings.
There are two rules
/ means or
() means optional
sounds very simple, and it is in many cases:
(A/E)ldridge should output Aldridge and Eldridge
Al(l)man should output Alman and AllmanThey can also be used together e.g. [TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"]Bes((t/w))ick[/TD]
[/TR]
</tbody>[/TABLE]
should output Beswick, Bestick and Besick
This can be complicated though e.g.
[TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"]B(e(a)/i)d(((w)e/a)ll/les) should output
Bedwell,Bedell,Bedall,Bedles,Beadwell,Beadell, Beadall,Beadles,Bidwell,Bidell,Bidall,Bidles[/TD]
[/TR]
</tbody>[/TABLE]
and [TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"](H)((A((l/u))/El/Il)/O)g(a/e)r(d)[/TD]
[/TR]
</tbody>[/TABLE]
should output
Hagar, Hagard,Hager, Hagerd, Halgar, Halgard, Halger, Halgerd, Haugar, Haugard, Hauger, Haugerd, Helgar, Helgard, Helger, Helgerd, Hilgar, Hilgard, Hilger, Hilgerd, Hogar, Hogard, Hoger, Hogerd, Agar, Agard, Ager, Agerd, Algar, Algard, Alger, Algerd, Augar, Augard, Auger, Augerd, Elgar, Elgard, Elger, Elgerd, Ilgar, Ilgard, Ilger, Ilgerd, Ogar, Ogard, Oger, Ogerd
The ideal output format would be in two columns, Column A would hold the unique identifier and Column B would hold the alternate spelling. Each row would hold a different alternate spelling. For example, if the input data was:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD](A/E)ldridge[/TD]
[/TR]
</tbody>[/TABLE]
The output data would be:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Aldridge[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Eldridge[/TD]
[/TR]
</tbody>[/TABLE]
Thank you very much for reading I hope you can help.
I have a list of alternate spellings of words (Column B), coupled with a unique number (Column A)
Essentially I need a list of all the alternate spellings.
There are two rules
/ means or
() means optional
sounds very simple, and it is in many cases:
(A/E)ldridge should output Aldridge and Eldridge
Al(l)man should output Alman and AllmanThey can also be used together e.g. [TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"]Bes((t/w))ick[/TD]
[/TR]
</tbody>[/TABLE]
should output Beswick, Bestick and Besick
This can be complicated though e.g.
[TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"]B(e(a)/i)d(((w)e/a)ll/les) should output
Bedwell,Bedell,Bedall,Bedles,Beadwell,Beadell, Beadall,Beadles,Bidwell,Bidell,Bidall,Bidles[/TD]
[/TR]
</tbody>[/TABLE]
and [TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"](H)((A((l/u))/El/Il)/O)g(a/e)r(d)[/TD]
[/TR]
</tbody>[/TABLE]
should output
Hagar, Hagard,Hager, Hagerd, Halgar, Halgard, Halger, Halgerd, Haugar, Haugard, Hauger, Haugerd, Helgar, Helgard, Helger, Helgerd, Hilgar, Hilgard, Hilger, Hilgerd, Hogar, Hogard, Hoger, Hogerd, Agar, Agard, Ager, Agerd, Algar, Algard, Alger, Algerd, Augar, Augard, Auger, Augerd, Elgar, Elgard, Elger, Elgerd, Ilgar, Ilgard, Ilger, Ilgerd, Ogar, Ogard, Oger, Ogerd
The ideal output format would be in two columns, Column A would hold the unique identifier and Column B would hold the alternate spelling. Each row would hold a different alternate spelling. For example, if the input data was:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD](A/E)ldridge[/TD]
[/TR]
</tbody>[/TABLE]
The output data would be:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Aldridge[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Eldridge[/TD]
[/TR]
</tbody>[/TABLE]
Thank you very much for reading I hope you can help.