«Quisimos ayudar a la vecina y recibimos una denuncia. ¿Es esa la gratitud?»

Hoy escribo esto con el corazón pesado. Solo queríamos ayudar a nuestra vecina, y a cambio recibimos una denuncia anónima. ¿Así se agradece?

Hace poco, un trabajador social llegó a nuestra casa. Nos dijo que habían recibido una queja: supuestamente, nuestros hijos estaban descuidados y no les dábamos las condiciones adecuadas. Revisó el piso, miró la nevera, habló con los niños… Todo estaba en orden. Rellenó unos papeles, nos pidió que los firmáramos y se fue. Pero aún no entiendo… ¿Quién hizo esto y por qué?

Isabel y Eduardo llevamos más de diez años casados. Tenemos dos hijos: un niño de ocho años y una niña de cinco. En casa hay orden, los niños están acomedidos, educados y van bien en el colegio. Ni en la escuela ni en la guardería se han quejado de ellos. Además, cuando les preguntamos, nos dijeron que todo iba bien. Así que la denuncia vino de fuera. ¿Pero de quién?

La respuesta llegó de la peor manera. Una semana después, Isabel vio en el patio a Eva, la nieta de nuestra vecina, la abuela Carmen. Recordó que, años atrás, habían discutido nada más conocerse. Desde entonces, no volvieron a hablarse. Pero ahora todo cobró sentido.

Con la abuela Carmen, Isabel y yo siempre tuvimos una relación cálida. A ella le encantó cuando nos mudamos al lado. Venía a menudo a tomar café, traía dulces caseros y cuidcoincide with a PRf or PRm (depending on which
agent is involved in the progression). For
example, if the initiator is female, the expected
path would be of the form:
[PRf [ ] (PRm)* ]
where the PRf node will be the first from the
left, and the sequence will terminate with a
PRm node. Likewise, if progression is initiated
by a male agent, the expected path will be of
the form:
[PRm [ ] (PRf)* ]
where the PRm node will be the first from the
left, and the sequence will terminate with a
PRf node. For example, if a female PR is the
initiator, the recognition of a progression in
which a male PR is the target (i.e., a female PR
progression), will be successful if the first
node in the sequence generated from the
input text contains a PRf and its right sibling
sequence contains a PRm. Any male PRs
found in between will be ignored. The same
applies for male PR progression, except that
the starting node will be a PRm and the final
node will be a PRf. All other node sequences
are considered invalid, and hence the
progression cannot be recognized.
2.4. Ontology Support
Our recognition framework also supports
ontologies in order to describe the
relationships between the involved entities
(e.g., kinship relations). An ontology allows
flexibility in agent specification. For example,
a male agent could be represented by the
keyword ‘father’ (if the ontology supports
kinship relationships), and could be both
retrieved and recognized by the system as a
male agent. Our framework uses the
ontology of relations from the WhoKnows
project [5], but can be extended to include
other ontologies (e.g., SUMO [8]).

2.5. Progression Rules
The recognition of a PRf (a female PR) is
done with respect to a set of rules. The
recognition process for a female PR includes
the following rule (similar rules apply for
male PRs):

PRf → (Next PRm) (Next PRf)* (Next PRm)

Where Next is a relation defined over the
agents involved in the progression. The rule
states that a female PR must be eventually
followed (as per the Next relation) by a male
PR, preceded by any number (including 0) of
intermediate female PRs (which are ignored),
and the sequence must end with a male PR.
The process is similar if a male PR is the
initiator (PRm), except that the expected
sequence will be PRm followed by any
number of male PRs, and then a female PR.
Likewise, the Next relation holds between
each pair of consecutive PRs in the identified
sequence.

2.6. Sequence Recognition
After the parse tree has been generated, the
system simulates recognizing a PR
progression by traversing the generated parse
tree (in our case, for English texts). The
results of the traversal for each of the possible
progression recognition scenarios (female PR
or male PR as initiator) are returned as
follows:

1. (PRf, true, PRm) if a female progression can
be recognized where PRf is the initiator, and
PRm is the target (same for male progression).

2. (PRf, false, null) if the progression cannot
be recognized (e.g., a female PR is the
initiator, but the parsing or traversal fails).

3. (null, false, null) if no recognition can be
done (e.g., the input text does not contain any
PRs, or the parse tree cannot be generated).

The first agent found in the input text
determines whether the system will attempt to
recognize a female or male progression. For
example, if the first PR in the text is a female
PR, the system will attempt to recognize a
female progression. If no such progression
can be recognized, the procedure returns (PRf,
false, null). Similarly, if the first PR in the text
is a male PR, the system will attempt to
recognize a male progression (with a similar
return result if parsing fails).

3. IMPLEMENTATION

Our implementation is realized in the
functional programming language F#. The
NLP processing is done using the SharpNLP
library [7], an open-source natural language
processing toolkit. SharpNLP is used here for
sentence splitting and POS tagging.

3.1. Parsing and POS Tagging

Our system first splits the input text (e.g.,
“My mother gave my father the gift.”) into
sentences, then each sentence is tokenized
into words, and POS tagging is applied. From
the resulting parse tree, noun phrases (NPs)
are extracted and analyzed. NPs are important
because they often contain subjects or objects,
which are of interest when recognizing PR
progressions. For example, in the sentence
“My mother gave my father the gift,” the NPs
are “My mother,” “my father,” and “the gift.”

3.2. Agent Recognition

In each NP, the system identifies potential
PRs by checking the head of the noun phrase
against the list of PR keywords (e.g., mother,
father, sister, brother, etc.). In the above
example, the heads of “My mother” and “my
father” are “mother” and “father”
respectively, which are recognized as PRs
(female and male, respectively). The PRs are
then arranged in the order they appear in the
sentence. The system then matches the
sequence of PRs to the respective progression
rule (e.g., PRf followed by PRm, ignoring any
intervening PRfs).

3.3. Ontology Queries

If a term is not found in the PR keyword list,
the system queries the ontology to check if the
term is a subclass of a known PR. For
example, “parent” is found in the ontology as
a superclass of both “mother” and “father,”
and hence is recognized as a potential PR. If
no agent can be recognized, the system
returns (null, false, null).

4. RESULTS AND DISCUSSION

The system was tested with a variety of input
texts, ranging from simple sentences (e.g.,
“My mother loves my father.”) to more
complex sentences (e.g., “Mary’s sister
visited her brother and his wife.”). For
example:

– Input: “My mother gave my father the gift.”
Output: (mother, true, father)

Here, the system recognizes a female
progression initiated by “mother” and
targeting “father.”

– Input: “His brother met her sister last night.”
Output: (brother, true, sister)

Here, a male progression is recognized,
initiated by “brother” and targeting “sister.”

– Input: “The cat sat on the mat.”
Output: (null, false, null)

No PRs are found, so no progression is
recognized.

4.1. Limitations

The current implementation has several
limitations:

1. The system does not handle negations or
modal verbs (e.g., “My mother did not call
my father”). This could be addressed by
extending the grammar rules.

2. Complex sentences with conjunctions or
embedded clauses are not always handled
correctly (e.g., “My mother and father went to
the store”). Here, both PRs are recognized,
but the sequence would not match a valid
progression.

3. The ontology is currently limited to kinship
terms.

5. CONCLUSION

We have presented a framework for the
recA pesar de todo, Isabel sigue mirando con cariño hacia el piso de la abuela Carmen, recordando las tardes de tortilla y risas que ya no volverán.

Rate article
MagistrUm
«Quisimos ayudar a la vecina y recibimos una denuncia. ¿Es esa la gratitud?»