Skip to content

Commit a33ff82

Browse files
committed
Improve removal of author names from synonyms
1 parent 2c3878f commit a33ff82

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

CitesChecklistParser/Regulation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public string ResourceValue()
116116
public void Output()
117117
{
118118
int index = 0;
119-
foreach (string synonym in this.SynonymNames.Where(words => ! words.Contains("(")).Distinct())
119+
foreach (string synonym in this.SynonymNames.Where(word => word.Count(c => char.IsUpper(c)) == 1).Distinct())
120120
{
121121
Console.WriteLine($"SET @base = (SELECT id FROM {this.ResourceTable()} WHERE scientific = \"{synonym}\");");
122122
Console.WriteLine($"SET @rename = (SELECT id FROM {this.ResourceTable()} WHERE scientific LIKE \"%{synonym.Split().Last()}\" HAVING COUNT(*) = 1);");

0 commit comments

Comments
 (0)