How to searh for very similar strings?

조회 수: 49 (최근 30일)
pietro
pietro 2019년 1월 25일
댓글: O.Hubert 2024년 2월 1일
Hi all,
I am doing a bibliometric analysis and especially, I have to search article titles on references of the citing papers. Here, you can see my code:
for iMS=1:length(MS)
Cit{iMS}=contains({MSCit.References},MS(iMS).Title,'IgnoreCase',true);
end
The code works pretty well, however the data that I can export from Scopus is not perfect. Indeed, article names are not consistent, so the perfect match does not always work. Here two examples:
Case 1:
Real article name: 'Biomethane production from different crop systems of cereals in Northern Italy'
Article name in the reference: 'Biomethane production from different crop systems of cereals in Nothern Italy'
Case 2:
Real article name: 'Methodology for the realisation of accelerated structural tests on tractors'
Article name in the reference: 'Methodology for the realization of accelerated structural tests on tractors'
As you can see, the two titles differ of a tiny character. Due to the fact that I have more than 20000 papers and fixing it by hand can be time-consuming, is there any way to programmatically search for very similar strings? As you can see, the strings might change also in length.
Thank you,
Cheers

채택된 답변

John D'Errico
John D'Errico 2019년 1월 25일
편집: John D'Errico 2019년 1월 25일
  댓글 수: 3
pietro
pietro 2019년 1월 26일
Hi all,
thanks for your precious feedbacks. MSCit is a struct of record of 21'000 records and MS is a struct with 2000 records. Each 'Referece' field of MSCit is composed of about 10'000 characters, while the 'Title' record of MS is composed of about 100 characters. So, I have thought to use a fuzzy search approach, that works, but I have to use a double-for (like the code below), so the computation time is very long.
ProvaCit=[];
for iCit=1:length(MSCit)
[d A] = fzsearch(lower(MSCit(iCit).References),lower(MS(iMS).Title));
if d<3
ProvaCit=[ProvaCit, iCit];
end
end
I have tought to do the following
[d A] = fzsearch({lower(MSCit(iCit).References)},lower(MS(iMS).Title));
but no real change. how could I speed-up the code? I thought to use a more stable parameter to limit the call of fzsearch. So, I tried to search for articles with similar authorships in the references with contains and then use fzsearch only in these articles. However, niether the author names are consistent. For example, I have found 'González' e 'Gonzalez'. Is there any easy and fast way to deal with this type of situation?
O.Hubert
O.Hubert 2024년 2월 1일
Certainly too late, but you could remove the accents and special characters from the string prior to running fzsearch.
Similar to this response. Adaptation to MATLAB is required, though, but you get the idea.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

제품


릴리스

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by