This commit is contained in:
@@ -36,8 +36,29 @@ void CCondition::Finalize()
|
||||
m_arrManual.RemoveAll();
|
||||
}
|
||||
|
||||
void CCondition::LoadSysnonyms(const CString& FileName)
|
||||
{
|
||||
FILE* fp = fopen(FileName.GetString(), "rt");
|
||||
if(fp == NULL)
|
||||
return;
|
||||
|
||||
m_SynonymList.clear();
|
||||
|
||||
char szNameFrom[100];
|
||||
char szNameTo[100];
|
||||
while(!feof(fp))
|
||||
{
|
||||
fscanf(fp, "%s %s\n", szNameFrom, szNameTo);
|
||||
m_SynonymList[szNameFrom] = szNameTo;
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
BOOL CCondition::Refresh()
|
||||
{
|
||||
LoadSysnonyms("기업_동의어.txt");
|
||||
|
||||
if( Init_Item_Multi( m_arrTextNot, "공시_부정문구.txt" ) )
|
||||
if( Init_Item_Multi( m_arrTextAnd, "공시_긍정문구.txt" ) )
|
||||
if( Init_Item_Multi( m_arrNewsPlusAnd_Special, "뉴스플러스_특별용_긍정문구.txt" ) )
|
||||
@@ -241,14 +262,14 @@ enum HM_CONDITION_TYPE CCondition::DetectConditionTitle( CString & strTitle, int
|
||||
{
|
||||
if( ! SearchNot( m_arrNewsPlusNot, strTitle ) ) // [뉴스플러스_부정문구]를 찾는다.
|
||||
{
|
||||
if ( SearchAnd( m_arrManual, strTitle ) ) // [뉴스플러스_수동문구]를 찾는다.
|
||||
return HM_CONDITION_TYPE_MANUAL;
|
||||
|
||||
if( SearchAnd( m_arrNewsPlusAnd_Special, strTitle ) ) // [뉴스플러스_특별용_긍정문구]를 찾는다.
|
||||
return HM_CONDITION_TYPE_SPECIAL;
|
||||
|
||||
if ( SearchAnd( m_arrNewsPlusAnd_Normal, strTitle ) ) // [뉴스플러스_일반용_긍정문구]를 찾는다.
|
||||
return HM_CONDITION_TYPE_NORMAL;
|
||||
|
||||
if ( SearchAnd( m_arrManual, strTitle ) ) // [뉴스플러스_수동문구]를 찾는다.
|
||||
return HM_CONDITION_TYPE_MANUAL;
|
||||
}
|
||||
}
|
||||
else // TK, IM, 7121 공통.
|
||||
|
||||
Reference in New Issue
Block a user