Data type 처리!!
2012-06-12 10:30:57

1. Property가 Data type인경우만 Literal을 보이도록한다.

2. Property에 해당 하는 Data type의 regex를 본다.

3. Property에 해당 하는 regex에 맞지 않으면 에러 처리

4. Rule로 변한 Regex를 반영한다.

▼ more
JavaCC의용량을 줄여주는 방향
2012-06-12 08:13:40

PARSER_BEGIN(OwlPathParser)

package Grammar;

public class OwlPathParser{}

PARSER_END(OwlPathParser)

SKIP :

{

" "

| "\t"

| "

"

| "

"

| < "//" (~[ "

", "

" ])*

(

"

"

| "

"

| "

"

) >

| < "/*" (~[ "*" ])* "*"

(

~[ "/" ] (~[ "*" ])* "*"

)*

"/" >

} /* ROOT */

SimpleNode Start() : {} { Sentence() EndOfSentence() < EOF > { return jjtThis; } }

void Sentence() : {} { Phrase() ( ( "," Conjunction() ) Phrase() )* }

void Phrase() : {} { NounPhrase() VerbPhrase() ( Conjunction() VerbPhrase())* }

void NounPhrase() : {} { Subject() ( RelativePronoun() (VerbPhrase() | TypePredicate() Class()))? }

void VerbPhrase() : {} { Predicate() ObjectPhrase() }

void ObjectPhrase() : {} { Object() ( RelativePronoun() (VerbPhrase() | TypePredicate() Class()))? }

void Subject(): {} { Individual() | Pronoun() | DefiniteIndividual() | Identifier() }

void Predicate(): {} { Property() }

void Object(): {} { Individual() | Pronoun() | DefiniteIndividual() }

void DefiniteIndividual (): {} { Article() Individual() }

▼ more
용어사용빈도가 날짜를 고려하도록 변경
2012-06-11 19:30:43

select (SELECT sum(writetime/1339410394624.0) FROM word,report where word.report_seq = report.seq and report.template_seq = 1 and word.word='hasPreExistingAdenoma')*0.3 + (SELECT sum(writetime/1339410394624.0) FROM word,report where word.report_seq = report.seq and report.template_seq = 1 and word.word='hasPreExistingAdenoma' and report.patient_seq = 7)*0.3 + (SELECT sum(writetime/1339410394624.0) FROM word,report where word.report_seq = report.seq and report.template_seq = 1 and word.word='hasPreExistingAdenoma' and report.clinician_seq = 2)*0.3;

▼ more
남겨둔 것과 한계
2012-06-11 18:10:48

[남겨 둘 것]

hasEntity 추가

[한계]

Rule들이 상충하는 경우 이를 보정할 수 없다.

같은 class를 range로 사용하는 경우 의도치 않게 변경될 수 있으니

규칙 작성시 여러 property가 하나의 class를 range로 갖지 않도록 해야한다.

▼ more