Compile a list of pairs of words beginning
- one by pro , the other by con and sharing the same strings of letters as a second part of the word.
Examples:
Protest - contest, profess- confess, protractor-contractor, prostitution - constitution …etc
I have provided some examples, not to worry, there is a plentitude of qualifying pairs.
clearvars,clc
fid=fopen('c:\words\words.txt','r');
words= string.empty;
while ~feof(fid)
w=fgetl(fid);
if length(w)>3
if isequal(w(1:3),'pro') || isequal(w(1:3),'con')
words(end+1,:)=[string(w(4:end)), string(w)];
end
end
end
words=sortrows(words);
for i=2:length(words)
if words(i,1)==words(i-1,1)
fprintf('%-22s',words(i,2),words(i-1,2));
fprintf('\n');
end
end
finds
procession concession
processional concessional
processions concessions
produce conduce
produced conduced
producer conducer
producers conducers
produces conduces
producing conducing
product conduct
production conduction
productions conductions
productive conductive
productivities conductivities
productivity conductivity
products conducts
profess confess
professed confessed
professedly confessedly
professes confesses
professing confessing
profession confession
professional confessional
professionalism confessionalism
professionalisms confessionalisms
professionally confessionally
professionals confessionals
professions confessions
professor confessor
professors confessors
profit confit
profits confits
profluent confluent
profound confound
profounder confounder
profounds confounds
profuse confuse
profusion confusion
profusions confusions
progress congress
progressed congressed
progresses congresses
progressing congressing
progressional congressional
pronate connate
pros cons
proscribe conscribe
proscribed conscribed
proscribes conscribes
proscribing conscribing
proscription conscription
proscriptions conscriptions
prosecution consecution
prosecutions consecutions
prospectus conspectus
prospectuses conspectuses
prostitute constitute
prostituted constituted
prostitutes constitutes
prostituting constituting
prostitution constitution
prostitutions constitutions
protend contend
protended contended
protending contending
protends contends
protest contest
protestant contestant
protestants contestants
protestation contestation
protestations contestations
protested contested
protester contester
protesters contesters
protesting contesting
protests contests
protract contract
protracted contracted
protractile contractile
protracting contracting
protraction contraction
protractions contractions
protractive contractive
protractor contractor
protractors contractors
protracts contracts
provenience convenience
proveniences conveniences
province convince
provinces convinces
provocation convocation
provocations convocations
provoke convoke
provoked convoked
provoker convoker
provokers convokers
provokes convokes
provoking convoking
|
Posted by Charlie
on 2022-07-03 09:22:13 |