I'm not sure if this does the right thing. If I understand this right, you configured the html2plaintextMapper... to refer to the default view internally by the name "plaintextSofa". That's why the view already exists - it's actually the default view.

I rather thought of using the input/outputSofa tags to specify which view the next component recieves as it's default view. This way you can avoid calling jcas.getView(...) in the following AE, since the jcas it received is already assured to be the the right one.

This way you can avoid having hardcoded view names in your AEs.

regards,
Matthias


Niels Ott schrieb:
Hi Matthias,

thanks for the hint. I tried to do it according to the manual. So this is what I did in the aggregate AE descriptor:

  <sofaMappings>
    <sofaMapping>
      <componentKey>html2plaintextMapperAnnotator</componentKey>
      <componentSofaName>plaintextSofa</componentSofaName>
      <aggregateSofaName>_InitialView</aggregateSofaName>
    </sofaMapping>
  </sofaMappings>

Now this does the job, but the html2plaintextMapperAnnotator cannot createView("plaintextSofa") because that view apparently already exists. I think it is produced by some magic of the aggregate engine.

Now since the view already exists, I cannot set the document text on it any more.

I'm quite confused by this and I'm really wondering whether it's just plain me who is a bit too plain for getting that or whether this is a "feature" in UIMA.

Best,

   Niels

Matthias Wendt schrieb:
Hi Niels,

you can specify the inputSofa in the capabilities section of the descriptor. consult the manual <http://incubator.apache.org/uima/downloads/releaseDocs/2.2.1-incubating/docs/html/tutorials_and_users_guides/tutorials_and_users_guides.html#ugr.tug.mvs.additional_capabilities> for additional information on this.

regards,

Matthias

Niels Ott schrieb:
Hi UIMA users!

I'm processing HTML data. Therefore I have an aggregate AE that does all kinds of magic using its own type system. As a last component in that pipeline, I have an AE that spills out plain text into another type system and a new CAS. What I'm doing is this:

  String plaintext = "..." // imagine all kinds of gathering text here

  newCas = cas.createView("plaintextSofa");
  newCas.setDocumentText(plainText);

Then I can select this new view in the CAS Visual Debugger.

However, other modules that are supposed to operate on plain text afterwards of course have the _initialView as input. I don't want to modify these other AEs, I simply want them to have the "plaintextSofa" as the default. I think this should be possible somewhere in the AE descriptors, but I don't get it.

Thanks four your comments and assistance.

Best,

   Niels








--
--------------------------------
Matthias Wendt
Junior Softwareentwickler
F&E

neofonie
Technologieentwicklung und
Informationsmanagement GmbH
Robert-Koch-Platz 4
10115 Berlin
fon: +49.30 24627 529
fax: +49.30 24627 120
[email protected]
http://www.neofonie.de
Handelsregister
Berlin-Charlottenburg: HRB 67460

Geschaeftsfuehrung
Helmut Hoffer von Ankershoffen
Nurhan Yildirim
Uwe-Gernot Fasold
--------------------------------

Reply via email to