- elk update
- 모의투자
This commit is contained in:
24
CodeList.cs
24
CodeList.cs
@@ -80,6 +80,9 @@ namespace NewsCrawler
|
||||
Console.WriteLine(SearchCode("[특징주] 에이치엘비-생명, 아파티닙 글로벌 임상 3상 최종 승인 소식에 상승세"));
|
||||
Console.WriteLine(SearchCode("진도군, 112건의 계약심사 통해 예산 10억원 절감"));
|
||||
|
||||
Console.WriteLine(SearchCode("[특징주] 브레인콘텐츠, 삼성전자 폴더블폰"));
|
||||
Console.WriteLine(SearchCode("[아시아경제] 큐젠바이오텍, 미국 지사 설립 추진"));
|
||||
|
||||
Console.WriteLine("Test End");
|
||||
}
|
||||
|
||||
@@ -274,10 +277,10 @@ namespace NewsCrawler
|
||||
string strReplace = Regex.Replace(strText, @"(\[).*(\])", "");
|
||||
strReplace = Regex.Replace(strReplace, @"(\().*(\))", "");
|
||||
strReplace = Regex.Replace(strReplace, @"(\<).*(\>)", "");
|
||||
string[] words = strReplace.Trim().Split(' ');
|
||||
string[] words = strReplace.Trim().Split(' ', ',');
|
||||
string strCodeWord = words[0];
|
||||
|
||||
CODE_VALUE Result = m_CodeList.Find(s => strCodeWord.Contains(s.m_strName));
|
||||
CODE_VALUE Result = m_CodeList.Find(s => (s.m_strName == strCodeWord));
|
||||
if(Result != null)
|
||||
return Result;
|
||||
|
||||
@@ -306,5 +309,22 @@ namespace NewsCrawler
|
||||
CODE_VALUE Result = m_CodeList.Find(s => s.m_strName == strCodeName);
|
||||
return Result;
|
||||
}
|
||||
|
||||
public List<string> GetAllDeny()
|
||||
{
|
||||
return m_CodeList.Where(r => r.m_enType == CODE_TYPE.DENIAL).Select<CODE_VALUE, string>(c => c.m_strName).ToList();
|
||||
}
|
||||
public List<string> GetAllDuplicated()
|
||||
{
|
||||
return m_CodeList.Where(r => r.m_enType == CODE_TYPE.DUPLICATED).Select<CODE_VALUE, string>(c => c.m_strName).ToList();
|
||||
}
|
||||
public List<string> GetAllManual()
|
||||
{
|
||||
return m_CodeList.Where(r => r.m_enType == CODE_TYPE.MANUAL).Select<CODE_VALUE, string>(c => c.m_strName).ToList();
|
||||
}
|
||||
public List<string> GetAllSynonym()
|
||||
{
|
||||
return m_SynonymList.Select(r => $"{r.m_strName}={r.m_strName}").ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user