2. TÜRKİYE’NİN EKONOMİK VE PARASAL BİRLİĞE UYUMU
2.2. Türkiye’nin Maastricht Kriterlerine Göre Mevcut Durumu Fasıl
2.2.4. Genel Devlet Borçlanma Gereği (Bütçe Açığı)
B.6 Padrões para Reconhecimento de Relações de
Composição & Partes
A gramática JAPE especificada abaixo é utilizada para reconhecimento de relações do tipo Composição & Partes implementadas por formações verbais do tipo “isPartOf” ou “have”.
//******************************************************************** Phase: PartsOf
Input: Token
Options: control = appelt
Macro: SUBSTANTIVO (
{Token.category == NN, Token.kind == word} | {Token.category == NNS, Token.kind == word}| {Token.category == NNP, Token.kind == word} | {Token.category == NNPS, Token.kind == word} | {Token.category == NP, Token.kind == word} | {Token.category == NPS, Token.kind == word} )
Macro: ARTIGODEF (
{Token.string == "the"} | {Token.string == "The"} | {Token.string == "THE"}
)
Macro: ARTIGOINDEF (
{Token.string == "a"} | {Token.string == "an"} | {Token.string == "A"} | {Token.string == "An"} )
Macro: ADJETIVO (
{Token.category == JJ, Token.kind == word} | {Token.category == JJR, Token.kind == word} | {Token.category == JJS, Token.kind == word} )
Macro: PARTIC_PASSADO (
{Token.category == VBN, Token.kind == word} )
Macro: POSSESSIVO (
{Token.category == POS, Token.kind == word} )
Macro: ADVERBIO (
{Token.category == RB, Token.kind == word} | {Token.category == RBR, Token.kind == word} | {Token.category == RBS, Token.kind == word} )
B.6 Padrões para Reconhecimento de Relações de Composição & Partes 133
// Tipo de padrão: Business’s objectives
////////////////////////////////////////////////////////////////////// Rule: PartOf1 Priority: 50 ( (((SUBSTANTIVO)* (SUBSTANTIVO)):Todo) (POSSESSIVO) (((SUBSTANTIVO)* (SUBSTANTIVO)):Parte) ):PartOf --> { try{
AnnotationSet partOfAnnSet = (AnnotationSet)bindings.get("PartOf"); Annotation partOf = (Annotation)partOfAnnSet.iterator().next();
//////////////////////////////////////////////////////////////// // MONTA a string de Parte lendo os tokens correspondentes AnnotationSet parteAnnSet = (AnnotationSet)bindings.get("Parte"); String parte = "";
TreeMap annotMap = new TreeMap();
if (parteAnnSet != null && parteAnnSet.size() != 0) {
//cria um ordered Map com modificadores ordenado por // posição no texto
Iterator iter = parteAnnSet.iterator(); Annotation annot;
FeatureMap features; while (iter.hasNext()){
annot = (Annotation)iter.next(); features = annot.getFeatures(); // verifica se não é sigla
if (features.get("orth").equals("allCaps")) { annotMap.put(annot.getStartNode().getOffset(), features.get("string")); } else { annotMap.put(annot.getStartNode().getOffset(), features.get("root")); } }
Iterator mapIt = annotMap.keySet().iterator(); Long key;
while (mapIt.hasNext()){ key = (Long)mapIt.next();
parte = parte + " " + (String)annotMap.get(key); }
parte = parte.trim(); }
//////////////////////////////////////////////////////////////////// // MONTA a string de Todo lendo os tokens correspondentes
AnnotationSet todoAnnSet = (AnnotationSet)bindings.get("Todo"); String todo = "";
annotMap.clear();
B.6 Padrões para Reconhecimento de Relações de Composição & Partes 134
//cria um ordered Map com modificadores ordenado por // posição no texto
Iterator iter = todoAnnSet.iterator(); Annotation annot;
FeatureMap features; while (iter.hasNext()){
annot = (Annotation)iter.next(); features = annot.getFeatures(); // verifica se não é sigla
if (features.get("orth").equals("allCaps")) { annotMap.put(annot.getStartNode().getOffset(),
features.get("string")); } else {
//corrige erro do POS tagger que marcou "cannot" como "NN" if ( !features.get("root").equals("cannot") ) {
annotMap.put(annot.getStartNode().getOffset(), features.get("root"));
//System.out.println("map todo <- " + features.get("root") ); }
} }
Iterator mapIt = annotMap.keySet().iterator(); Long key;
while (mapIt.hasNext()){ key = (Long)mapIt.next();
todo = todo + " " + (String)annotMap.get(key); }
todo = todo.trim(); }
gate.FeatureMap features = Factory.newFeatureMap(); features.put("todo", todo);
features.put("relacao", "is_part_of"); features.put("parte", parte);
outputAS.add(partOfAnnSet.firstNode().getOffset(),
partOfAnnSet.lastNode().getOffset(), "PartOf", features);
} catch(InvalidOffsetException ioe){ ioe.printStackTrace(); }
}
/////////////////////////////////////////////////////////////////////////////
// objectives of the business
///////////////////////////////////////////////////////////////////////////// Rule: PartOf2 Priority: 50 (
(((SUBSTANTIVO)* (SUBSTANTIVO)):Parte )
({Token.string == "of"} | {Token.string == "OF"} | {Token.string == "Of"}) ((ARTIGODEF) | (ARTIGOINDEF)) (ADJETIVO)? (ADJETIVO)? (ADJETIVO)?
(((SUBSTANTIVO)* (SUBSTANTIVO)):Todo) ):PartOf
B.6 Padrões para Reconhecimento de Relações de Composição & Partes 135
{ try{
AnnotationSet partOfAnnSet = (AnnotationSet)bindings.get("PartOf"); Annotation partOf = (Annotation)partOfAnnSet.iterator().next();
////////////////////////////////////////////////////////////////////// // MONTA a string de Parte lendo os tokens correspondentes
AnnotationSet parteAnnSet = (AnnotationSet)bindings.get("Parte"); String parte = "";
TreeMap annotMap = new TreeMap();
if (parteAnnSet != null && parteAnnSet.size() != 0) {
//create an ordered Map with the modifiers, ordered by their // position in the text
Iterator iter = parteAnnSet.iterator(); Annotation annot;
FeatureMap features; while (iter.hasNext()){
annot = (Annotation)iter.next(); features = annot.getFeatures(); // verifica se não é sigla
if (features.get("orth").equals("allCaps")) { annotMap.put(annot.getStartNode().getOffset(), features.get("string")); } else { annotMap.put(annot.getStartNode().getOffset(), features.get("root")); }
//System.out.println("map parte <- " + features.get("string") ); }
Iterator mapIt = annotMap.keySet().iterator(); Long key;
while (mapIt.hasNext()){ key = (Long)mapIt.next();
parte = parte + " " + (String)annotMap.get(key); }
parte = parte.trim(); }
//////////////////////////////////////////////////////////////////////// // MONTA a string de Todo lendo os tokens correspondentes
AnnotationSet todoAnnSet = (AnnotationSet)bindings.get("Todo"); String todo = "";
annotMap.clear();
if (todoAnnSet != null && todoAnnSet.size() != 0) {
//cria um ordered Map com modificadores ordenado por // posição no texto
Iterator iter = todoAnnSet.iterator(); Annotation annot;
FeatureMap features; while (iter.hasNext()){
annot = (Annotation)iter.next(); features = annot.getFeatures(); // verifica se não é sigla
if (features.get("orth").equals("allCaps")) { annotMap.put(annot.getStartNode().getOffset(),
B.6 Padrões para Reconhecimento de Relações de Composição & Partes 136
features.get("string")); } else {
//corrige erro do POS tagger que marcou "cannot" como "NN" if ( !features.get("root").equals("cannot") ) { annotMap.put(annot.getStartNode().getOffset(), features.get("root")); } } }
Iterator mapIt = annotMap.keySet().iterator(); Long key;
while (mapIt.hasNext()){ key = (Long)mapIt.next();
todo = todo + " " + (String)annotMap.get(key); }
todo = todo.trim(); }
gate.FeatureMap features = Factory.newFeatureMap(); features.put("todo", todo);
features.put("relacao", "is_part_of"); features.put("parte", parte);
outputAS.add(partOfAnnSet.firstNode().getOffset(), partOfAnnSet.lastNode().getOffset(),"PartOf", features); //System.out.println("PartOf: "+ todo + " tem " + parte);
} catch(InvalidOffsetException ioe){ ioe.printStackTrace(); }
137
Anexo C -- Recursos Utilizados
Aqui são apresentados alguns dos recursos utilizados neste trabalho.
C.1 O Corpus do PMBOK
Tabela C.1: Alguns dos primeiros parágrafos do PMBOK
Organizations perform work. Work generally involves either operations or projects, although the two may overlap. Operations and projects share many characteristics; for example, they are: performed by people; constrained by limited resources; planned, executed, and control- led.
Operations and projects differ primarily in that operations are ongoing and repetitive while projects are temporary and unique. A project can thus be defined in terms of its distinctive characteristics: a project is a temporary endeavor undertaken to create a unique product or service. Temporary means that every project has a definite beginning and a definite end. Unique means that the product or service is different in some distinguishing way from all similar products or services.
Projects are undertaken at all levels of the organization. They may involve a single person or many thousands. They may require less than 100 hours to complete or over 10,000,000. Projects may involve a single unit of one organization or may cross organizational boundaries as in joint ventures and partnering.
Projects are often critical components of the performing organization’s business strategy. Examples of projects include: Developing a new product or service; Effecting a change in structure, staffing, or style of an organization; Designing a new transportation vehicle; Deve- loping or acquiring a new or modified information system; Constructing a building or facility; Running a campaign for political office; Implementing a new business procedure or process. Temporary means that every project has a definite beginning and a definite end. The end is reached when the project’s objectives have been achieved, or when it becomes clear that the project objectives will not or cannot be met and the project is terminated. Temporary does not necessarily mean short in duration; many projects last for several years. In every case, however, the duration of a project is finite; projects are not ongoing efforts. In addition, temporary does not generally apply to the product or service created by the project.
Most projects are undertaken to create a lasting result. For example, a project to erect a national monument will create a result expected to last centuries. Many undertakings are temporary in the sense that they will end at some point. For example, assembly work at an automotive plant will eventually be discontinued, and the plant itself decommissioned. Projects are fundamen- tally different because the project ceases when its declared objectives have been attained, while nonproject undertakings adopt a new set of objectives and continue to work.