What is the role of ontologies in natural language processing when using GATE?
As I understand it, at a high level, an ontology allows for the modelling of a domain consisting of classes, their instances, properties of these instances and relationships between classes in the domain.
However is there an advantage to creating a custom ontology when working with GATE?
Or can processing be as effective using the only the built in processing resources provided by ANNIE?
You can check this tutorial on ontologies in GATE.
As stated in the pdf:
Link annotations to concepts in a knowledge base.
The annotated text is a “Mention” of a concept in the KB
We can use the knowledge associated with Mentions in our IE pipeline: e.g. Persons have JobTitles, Cities have zip codes
We can use the knowledge associated with Mentions for “Semantic Search”
We can use semantically annotated documents to add new facts to our knowledge base
In the process of annotation, ontology data (instances, classes, relations, etc.) can be used by JAPE for smarter matching, i.e. matching a mention with class "engineer", knowing that "engineer" is a subclass of a "person". Also there are ontology-aware gazetteers which can create annotations based on instances and put the right class and uri for the created annotations.
The last two questions are too generic but I'll try...
After following the tutorial, you'll know exactly how to use ontologies for annotation, hence you'll know if you need to create a custom ontology for your task.
ANNIE is an example of a pipeline and a good place to start studying GATE and writing your own application.
Related
I was wondering if it was possible to have differences between my conceptual model and the class diagram?
In the conceptual model, I explain that the user can create a message.
But in the class diagram the user must go through a class that contains all methods of creating a "ManageMessage" message.
here is an example
Can you help me ? Thank you
It's up to you how you show your classes in different diagrams. So in one you can show detailed attributes and operations and in another you show just the class name. However, in most cases it's better to create domain model which focuses on business aspects in the beginning. It does not have technically imposed structural elements and mainly you use attributes (YMMV). Later you derive a technical design from that model where you create a copy that links back with <<trace>> dependencies (UML tools offer transformation for that). Although you have to (mostly) manually synch the two models it's best to communicate with either business and developers.
N.B. about your design above: A message with zero related users does not seem to make much sense. Also you should not use the shared aggregation since it has no defined semantics.
I read there are 5 disciplines in a unified process, Requirements, Analysis, design, Implementation, and test.
I've basically done the following UML's and I'm trying to add an explanation of how I adhered to the unified process. I did the following UML's for my project: Use case, Analysis class, Design class, Activity, Sequence, Deployment, state machine, and component.
I can already tell based on content that the use case falls into the categories of requirements. Analysis class falls into the category of analysis. Design class in design. But what about the other 2 disciplines? I am having some trouble understanding unified process. But if I were to assign the UML's to a discipline, what would they be assigned to.
Implementation will be a mix of class and component and deployment diagrams. For test there's nothing in pure UML. You can create your own profile for it. Basically it ends up in sort of use case diagram for business with traces to requirements being marked in some way. Unit testing can trace classes to requirements. This is a wide open area where you can write more than one thesis about.
Can someone explain me the difference between class diagram during analysis and design?
So far, I understand that the class diagram of design would be the real class diagram, with all methods and attributes (ready to become code), but what about analysis? Do I have to do a class diagram for every sequence diagram? Do I have to add methods and attributes at the design stage already ? Or only connection?
The UML class model is produced and refined iteratively as the understanding of the system increases. There's only one model for your system, although different diagrams may outline different aspects and level of details of this model.
Typically you would start with the domain model based on the requirements (e.g. use cases, user stories, statement of work, user interviews, etc.):
Top priority is to get an overview. So the first sketch would identify the domain classes and how they relate to each other.
You would then enrich this initial understanding by outlining in the diagram the key properties and methods that are essential to the understanding of the domain.
You would then enrich the model with more detailed design diagrams as you design your solution. So you would add any classes required for the implementation (e.g.user interface classes, application controllers, persistence layers, etc.).
Design diagrams are used to get a shared understanding about the software structure within the development team. So they should be easy to understand (i.e.focus on important aspects and not necessarily be cluttered with too many details that would anyhow have to be implemented in code and quickly be outdated if you don't have an army of analysts to update the model).
If you'd use an UML tool able to generate code or if you are contractually obliged to provide all the details in UML form, you would further refine the model with a fully detailed implementation diagram. Attention: for scholar work it is frequent that the teacher asks for a design diagram but expects in reality an implementation diagram.
We have 3 major types of class diagram in Object Oriented Methodologies.
Class Diagrams in Requirement (Domain Modeling)
Analysis Class Diagrams
Design Class Diagrams
Main difference of these class diagrams is their Abstraction.
In Domain Modeling, we use Class Diagrams. BUT, we do not use any Inheritance or any Interfaces, or any preforming analysis on the classes. We just write so little attributes of classes (about 3 attributes). we don't write any methods of classes. WHY? because of Abstraction. Main goal of Domain Modeling is modeling the domain. And detect Which classes should be in problem domain of system.
In Analysis modeling, we use class diagram. Classes in analysis is more detailed than classes in Domain. But it is not the final specification.
In Analysis, we determine Analysis Classes. We can use Inheritance between them. We can write their attributes and methods in detail. BUT, this phase is done by System Analysts. (Not System Designers or Programmer). Their profession is both knowing the Business Logics and Software Techniques. So they can write analysis classes in more detailed than Domain. However, they can not write very detailed as System Designers can.
In the other hand, we can use some analysis patterns to determine our Analysis Classes. For example RUP introduce Boundary/Control/Entity pattern. If we decided to use an existing analysis pattern, we can use the guidelines exist in the pattern documentations.
The guideline of Boundary/Control/Entity about the abstraction of classes are in this reference. In this pattern we should write only attributes for Entity classes and write only methods for Control classes and write attributes and methods for Boundary classes.
However, In my idea, we can follow the guideline or not. We can write more attributes and methods for analysis classes. What is happening? If our System Analyst try to write more detailed attributes or methods, what's happening:
I think that 1) our system analyst is not system analyst. maybe system designer. 2) we don't need their details. It is just time consuming for analysis phase. 3) ONLY if our analysis and design team are the same, or we combine analysis and design (like Agile Methodologies) the details in Analysis can be logical and useable.
In Design modeling, we use class diagram, this type of class diagram should be the final specification and should contain all attributes and methods. This classes are not conceptual. we can use all OOD technologies, Design Pattern and etc.
I'm studying for a reexam in OOAD and doing some old exam questions. I'm trying to develop an analysis class model that may be used to manage a restaurant's menus. Here are the requirements:
Several different menus (breakfast,lunch,dinner)
Dishes may exists in several different menus
The restaurant also provides catering
Dishes should keep information which is relevant for guests with special requests (vegetarian,allergies etc..) Special menus may be created using this information as search criteria.
How I should model the catering? Should there be a Menu class and then breakfast,lunch,dinner and special as specialization classes or should I just have one Menu class? Should there be specialization classes for vegetarian,gluten free..etc dishes?
Then I have this question which confuses me a bit..
"What are 4 tasks that must be addressed when you transform this analysis class model into a design model?"
What is meant by this? Are there 4 general tasks/steps that always should be done when translating an analysis model into a design model or is it 4 specific tasks specifically for this analysis class model?
I've looked thorugh the presentations and the book (OOAD with applications) and the only thing I found related to these 4 steps/tasks was in a case study:
■ Identify the architectural elements at the given level of abstraction to further establish the problem boundaries and begin the object-oriented decomposition.
■ Identify the semantics of the elements, that is, establish their behavior and attributes.
■ Identify the relationships among the elements to solidify their boundaries and collaborators.
■ Specify the interface of the elements and then their refinement in preparation for analysis at the next level of abstraction.
Regards
How I should model the catering? Should there be a Menu class and then breakfast,lunch,dinner and special as specialization classes or should I just have one Menu class? Should there be specialization classes for vegetarian,gluten free..etc dishes?
You should be modeling your business requirements. In your case, the requirements you have are from your exam task only. So you will have to decide what you include in your model. Only include in your business domain model what you think you will need to hold a state, or perform an operation on.
Should there be specialization classes for vegetarian,gluten free..etc dishes?
Should be possible to save that in a simple boolean flag in the meal class, don't you think?
The "4 tasks" question is open for interpretation and is probably best answered when you have the documents from your studies available. At least I'd consider the 4 tasks you list a reasonable answer to the question.
Welcome to StackOverflow.
If you post your modeling attempts as a image file, you may receive more detailed help. You may use a service like dropbox to reference graphics until you have enough reputation for uploads to SO.
Class diagram by myself,for reference.
In our e-commerce domain, we have a hierarchy of entities that are modeled using nested arrays. We do this using the principles of Domain-Driven Design (as explained by Eric Evans). The central concepts in our e-commerce domain are:
Contracts, which HAVE Exchanges, each of which HAS both Services and Payments. Services, in turn, HAVE Features that describe each service.
This hierarchical model enables us to express any contract, no matter how complex, including those that have multiple agreements (that is, Exchanges) as part of the overall agreement (or, Contract).
Does Drools not support such hierarchical object models? Should I invert my object model to a flat object model with no arrays (like the "Fires HAVE Rooms" & "Sprinklers HAVE Rooms" example in the Drools Expert documentation) as follows?
Contracts.
Exchanges, each of which HAS a single Contract.
Services and Payments, each of which HAS a single Exchange.
Features, each of which HAS a single Service.
Am I right that inverting hierarchical object models in this way, into flat object models with atomic assertions, is what is supported and works best in Drools? Drools doesn't appear to support a rule with LHS conditions on a fact and a fact that is in a subcollection.
If so, why doesn't Drools support more hierarchical object models? Is it because Drools comes from the AI world (not the object-oriented world) in which First-Order Logic expresses all facts as atomic subject-predicate-value statements, and not the object-oriented world in which entity objects have identity, value objects don't have identity, and entity objects are composed of other entity and value objects?
You can define rules against any Java object model.
The documentation provides examples based on toy problems to avoid distraction from what it's explaining. Not because Drools is incapable of dealing with more complex models. If you read a bit further through the manual, you will see examples for dealing with lists using syntax such as 'contains' or accumulators.
It's up to you how you model this. You can insert Contracts, Exchanges, Services, Payments and Features as separate facts, which reference each other. Alternatively, you could just insert a complex Contract fact, which contains lists of Exchanges, which contain lists of Services, etc.
Which works better for you depends on whether your rules match on a Contract with very little chaining, or whether you want a rule to react to something such as a change in a Feature, or the insertion of a Payment fact.
Nested accessors on objects is supported, as Drools works with any Pojo. However there is no reactivity on nested accessors.
It is possible, as a feature request, to start adding nested accessor reactivity, by inserting listeners. It's a non trivial piece of work, but it would be very interesting.