Skip to content

Commit

Permalink
Merge pull request #1380 from Clear-Bible/Import_word_analysis_error_…
Browse files Browse the repository at this point in the history
…no_lexemes

Fixed Bethany's import word analysis error she saw on CARS_B dashboar…
  • Loading branch information
gerfen authored Jul 17, 2024
2 parents 9814f91 + 28dc7f3 commit fb16d1a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ protected override async Task<RequestResult<Unit>> SaveDataAsync(ImportWordAnaly
.Select(e => (surfaceText: e.Lemma!, trainingText: e.Lemma!, tokenType: e.Type, circumfixGroup: default(string?), grammarId: default(Guid?)))
.ToArray();

// If there are no Lexemes for this word analysis, there is nothing to split the token into, so skip:
if (replacementTokenInfos.Length == 0)
{
continue;
}

var standaloneTokens = supersetTokens.Where(e => e.SurfaceText == wordAnalysis.Word).ToList();

if (replacementTokenInfos.Length == 1)
Expand Down

0 comments on commit fb16d1a

Please sign in to comment.