File processing
Input format: Input files must be in .txt FORMAT with UTF-8 ENCODING and contain PORTUGUESE TEXT. Input files and folders can also be compressed to the .zip format.
Privacy: The input file you upload and the respective output files will be automatically deleted from our computer after being processed and the result downloaded by you. No copies of your files will be retained after your use of this service.
Email address validation
Loading...
The size of your input file is large and its processing may take some time.
To receive by email an URL from which to download your processed file, please copy the code displayed below into the field "Subject:" of an email message (with the message body empty) and send it to request@portulanclarin.net
To proceed, please send an email to request@portulanclarin.net with the following code in the "Subject" field:
To: | request@portulanclarin.net |
|
Subject: |
|
The communication with the server cannot be established. Please try again later.
We are sorry but an unexpected error has occurred. Please try again later.
The code has expired. Please click the button below to get a new code.
For enhanced security, a new code has to be validated. Please click the button below to get a new code.
Privacy: After we reply to you with the URL for download, your email address is automatically deleted from our records.
Instructions to use this web service
The web service for this application is available at https://portulanclarin.net/workbench/lx-timeanalyzer/api/.
Below you find an example of how to use this web service with Python 3.
This example resorts to the requests package. To install this package, run this command in the command line:
pip3 install requests
.
To use this web service, you need an access key you can obtain by clicking in the button below. A key is valid for 31 days. It allows to submit a total of 1 billion characters by means of requests with no more 200000 characters each. It allows to enter 100,000 requests, at a rate of no more than 200 requests per hour.
For other usage regimes, you should contact the helpdesk.
The input data and the respective output will be automatically deleted from our computer after being processed. No copies will be retained after your use of this service.
import json
import requests # to install this library, enter in your command line:
# pip3 install requests
# This is a simple example to illustrate how you can use the LX-TimeAnalyzer web service
# Requires: key is a string with your access key
# Requires: text is a string, UTF-8, with a maximum 200000 characters, Portuguese text, with
# the input to be processed
# Requires: year is an integer
# Requires: month is an integer in range 1 to 12
# Requires: day is an integer in range 1 to 31
# Requires: hour is an integer in range 0 to 23
# Requires: minute is an integer in range 0 to 59
# Requires: second is an integer in range 0 to 59
# Ensures: output according to specification in https://portulanclarin.net/workbench/lx-timeanalyzer/
# Ensures: dict with number of requests and characters input so far with the access key, and
# its date of expiry
key = "access_key_goes_here" # before you run this example, replace access_key_goes_here by
# your access key
# Change the next time-related variables to specify the reference time:
year = 2011
month = 9
day = 12
hour = 14
minute = 0
second = 0
# this string can be replaced by your input
text = """Emigração e crise reduzem nova edição de Os Cinco a Os Três
Por Mário Botequilha
As aventuras de Os Cinco, de Enid Blyton, vão ser reeditadas, com novas imagens, nova
tradução e menos um bicho.
Tim, o cãozito, desaparece misteriosamente logo na página 24 do primeiro volume, Os Cinco
na Ilha do Tesouro, depois de o grupo de amigos ter ido jantar a um restaurante chinês. A
edição de 2011, o ano da crise, também deverá implicar a mudança do nome da série, para Os
Três, porque David vai trabalhar para a construção civil no Dubai ou porque Júlio acaba o
doutoramento em astrofísica e arranja um emprego num talho de supermercado, ainda não está
decidido. MB
"""
# To read input text from a file, uncomment this block
#inputFile = open("myInputFileName", "r", encoding="utf-8") # replace myInputFileName by
# the name of your file
#text = inputFile.read()
#inputFile.close()
# Processing:
url = "https://portulanclarin.net/workbench/lx-timeanalyzer/api/"
request_data = {
"method": "analyze",
"jsonrpc": "2.0",
"id": 0,
"params": {
"text": text,
"year": year,
"month": month,
"day": day,
"hour": hour,
"minute": minute,
"second": second,
"key": key,
},
}
request = requests.post(url, json=request_data)
response_data = request.json()
if "error" in response_data:
print("Error:", response_data["error"])
else:
print("Result:")
print(response_data["result"])
# To write output in a file, uncomment this block
#outputFile = open("myOutputFileName","w", encoding="utf-8") # replace myOutputFileName by
# the name of your file
#output = response_data["result"]
#outputFile.write(output)
#outputFile.close()
# Getting acess key status:
request_data = {
"method": "key_status",
"jsonrpc": "2.0",
"id": 0,
"params": {
"key": key,
},
}
request = requests.post(url, json=request_data)
response_data = request.json()
if "error" in response_data:
print("Error:", response_data["error"])
else:
print("Key status:")
print(json.dumps(response_data["result"], indent=4))
Access key for the web service
This is your access key for this web service.
The following access key for this web service is already associated with .
This key is valid until and can be used to process requests or characters.
An email message has been sent into your address with the information above.
Email address validation
Loading...
To receive by email your access key for this webservice, please copy the code displayed below into the field "Subject" of an email message (with the message body empty) and send it to request@portulanclarin.net
To proceed, please send an email to request@portulanclarin.net with the following code in the "Subject" field:
To: | request@portulanclarin.net |
|
Subject: |
|
The communication with the server cannot be established. Please try again later.
We are sorry but an unexpected error has occurred. Please try again later.
The code has expired. Please click the button below to get a new code.
For enhanced security, a new code has to be validated. Please click the button below to get a new code.
Privacy: When your access key expires, your email address is automatically deleted from our records.
LX-TimeAnalyzer's documentation
LX-TimeAnalyzer
LX-TimeAnalyzer is a freely available online service for the extraction of temporal information from Portuguese text. It was developed and is mantained by the NLX-Natural Language and Speech Group at the University of Lisbon, Department of Informatics.
Features
LX-TimeAnalyzer extracts temporal information from Portuguese texts. Given an input text, it finds the following elements:
- Temporal expressions, which are expressions that occur in the input text and that refer to dates and times;
- Events terms, which are words that refer to events that happen or hold at some point in time;
- Temporal relations between these times and events, i.e. the temporal ordering among these entities, according to the input text. The possible relations are IS BEFORE (the first event precedes the second event), IS AFTER (the first event follows the second event), and OVERLAPS (both events overlap in time).
The temporal relations are also extracted in relation to the reference time given.
Output format
The output of LX-TimeAnalyzer is presented in two columns.
The input text is shown on the left column. The time expressions that occur in this text are highlighted in green. Hovering the mouse cursor over them shows information about the time or date that they refer to, in a normalized format. Event terms are presented in orange. Hovering the mouse cursor over any of these elements shows the temporal relations which the mentioned entity enters.
The right column shows a temporal graph for the paragraph on its left. In this temporal graph, nodes represent times (including the document's creation time) and events. Green nodes represent times, and orange nodes represent events. Temporal relations are also encoded in this graph.
Temporal precedence is shown with an arrow between two nodes. The arrow's direction indicates the flow of time: an arrow going from a node m to a node n means that the entity represented by m precedes in time the entity represented by n. Most arrows go from left to right, and usually (but not always) reading these graphs in that direction matches the temporal flow of the described events and times.
Entities that temporally overlap are represented in this graph with nodes that tend to be vertically aligned, but this is not always feasible. Therefore, not all entities that temporally overlap are necessarily placed on the same column, and not all nodes that are aligned vertically represent entities that temporally overlap, but many do.
If the text contains more than one paragraph, a graph for the entire text is shown below these two columns.
Authorship
LX-TimeAnalyzer was developed by Francisco Costa and António Branco, in the NLX-Natural Language and Speech Group, at the University of Lisbon, Department of Informatics.
Acknowledgments
The work leading to LX-TimeAnalyzer was supported by FCT—Fundação para a Ciência e Tecnologia—under the research grant SFRH/BD/40140/2007.
LX-TimeAnalyzer makes use of Joda-Time and LX-Suite. The web demo uses Graphviz, jQuery and Tipsy.
Publications
Irrespective of the most recent version of this tool you may use, when mentioning it, please cite this reference:
- Costa, Francisco and António Branco, 2012, "Aspectual Type and Temporal Relation Classification". In Proceedings, EACL2012 - 13th Conference of the European Chapter of the Association for Computational Linguistics, Avignon, France, 23-27 April 2012, pp.266-275.
Other publications:
- Costa, Francisco and Branco, António. 2012. "Extracting Temporal Information from Portuguese Texts". In Helena Caseli, Aline Villavicencio, António Teixeira e Fernando Perdigão (eds.), Computational Processing of the Portuguese Language-10th International Conference, PROPOR 2012, volume 7243 de Lecture Notes in Artificial Intelligence, pp. 99-105, Berlin: Springer.
- Costa, Francisco and Branco, António. 2012. LX-TimeAnalyzer: A Temporal Information Processing System for Portuguese. Technical Report DI-FCUL-TR-2012-01, Universidade de Lisboa, Faculdade de Ciências, Departamento de Informática.
- Costa, Francisco e Branco, António. 2013. "Temporal Relation Classification Based on Temporal Reasoning". In Proceedings of the 10th International Conference on Computational Semantics, Potsdam.
- Costa, Francisco. 2013. Processing Temporal Information in Unstructured Documents. Doctoral dissertation, Universidade de Lisboa, Lisbon.
Contact us
Contact us using the following email address: 'nlxgroup' concatenated with 'at' concatenated with 'di.fc.ul.pt'.
Why LX-TimeAnalyzer?
LX because LX is the "code" name Lisboners like to use to refer to their hometown.
License
No fee, attribution, all rights reserved, no redistribution, non commercial, no warranty, no liability, no endorsement, temporary, non exclusive, share alike.
The complete text of this license is here.