|
이건 제 전공 분야와 약간 관련있는 건데요...
자연어 문장은 구두점(.,?!)등으로 간단하게 구분되지 않습니다.
예를 들어,
Prof. vs. etc. Mr. Mrs. Ms. Jr. Calif. Wash. 와 같은 약어와
$22.50 과 같은 숫자를 구분하는 문제와,
I've와 David's 등의 어포스트로피와 작은 따옴표의 구분이라든지
"You remind me," she remarked, "of your mother."
를
she remarked, 와
"You remind me, of your mother." 로
구분한다든지 하는 문제들이죠.
상당히 복잡한 자연어 처리 관련 인공지능 기술을 필요로 합니다.
이 문제를 해결하는 것만으로도 충분히 박사과정 논문거리입니다. -_-;;
보통, 대용량의 약어 사전과, 대용량의 규칙들(rules)을 사용하거나,
신경망(neural network)이나 최대 엔트로피 모델(Maximun Entropy Model)과 같은
기계 학습(machine learning) 기술을 사용해서 해결합니다.
쥬니짱 님이 쓰신 글 :
: 여러줄에 텍스트가 있는데 마침표가 찍힌 부분가지만 구분해서 여러 문장으로 분리해서 나오게
: 하는데요... 근데 앞에 < ! 문장 !! > 이렇게 되면 느낌표 사이에 있는 마침표는 인식안하구
: 느낌표로만 구분해서 분리할려구 하거든요...
: 예를들면 이런 문장이 있다면
: North Korea as one of the axis of evil countries was not a precursor to war.
: We have no intention of er invading North Korea.
: South Korea has no intention of attacking North Korea[; nor er] does America.
: We're purely defensive [and the reason] we have to be defensive [is] because there is a threatening position on the DMZ.
: Bush spoke at a news conference in Seoul.
:
: 이런 문장이 있으면 현재는 마침표(.)가 찍힌 부분까지
: North Korea as one of the ["]axis of evil["] countries was not a precursor to war.
: 분리
: "We have no intention of er invading North Korea.
: 분리
: 이런대요....
: !North Korea as one of the ["]axis of evil["] countries was not a precursor to war.
: "We have no intention of er invading North Korea.!
: 앞뒤로 느낌표를 찍으면 중간에 마침표는 인식안하구 느낌표로만 분리되는거죠...
: 또 담줄부터는 다시 마침표로
: South Korea has no intention of attacking North Korea[; nor er] does America.
: 분리
: 좀 난해하죠?....죄송합니다....
: 이걸 어떻게 표현해야 할지 몇칠째 고민하다가 이렇게 죄송한 마음으로 도움을 요청합니다...
: 고수님들 초보를 불쌍히 여기시어 도와주세요....감사합니다...
:
: 참고로 소스를 첨부하겠습니다..
: String S = "";
: SectionList->Clear();
: paragraphList.clear();
: Text = Text.Trim();
: for(int i=0; i<Text.Length(); i++)
: {
: char c = Text[i+1];
: S += String(c);
: if(c == '.')
: {
: if (i+1 < Text.Length())
: {
: char d = Text[i+2];
: if (d == '"' || d == '\'')
: {
: S += String(d);
: i++;
: }
: else if (isalpha(d))
: {
: continue;
: }
: }
: S = S.Trim();
: SectionList->Add(S);
: S = "";
: }
: }
: }
:
:
:
:
:
|