using System.Collections.Generic;
List<string> sourceList = new List<string>()
"Realme smartphone has super Amoled screen with 4GB RAM capacity.",
"Realme smartphone has LCD screen with 4GB RAM capacity.",
"Realme phone has LCD screen with 6GB RAM capacity.",
"Realme phone has LED screen with 6GB RAM capacity.",
"Realme has smartphone with super Amoled screen with 4GB RAM and 4GB extended memory capacity",
"Realme has LCD phone with 6GB RAM capacity."
var searchStr = new string[3]{ "Realme", "phone", "LCD" };
.OrderByDescending(CountWords(searchStr))
.ThenByDescending(CountOrderedWords(searchStr))
.ThenByDescending(CountExactWords(searchStr));
Func<string, int> CountWords(params string[] terms) => s => terms.Count(t => s.Contains(t));
Func<string, int> CountOrderedWords(params string[] terms) => s => {
foreach(var t in terms) {
Func<string, int> CountExactWords(params string[] terms) => (string s) => terms.Count(t => s.Split(' ', '.', ',').Contains(t));
result.ToList().ForEach(r => Console.WriteLine($"{r} ({CountWords(searchStr)(r)}, {CountOrderedWords(searchStr)(r)}, {CountExactWords(searchStr)(r)})"));