Release date: 2023-12-19
- Properly define
delphin
command in pyproject.toml (#386)
Release date: 2023-12-11
- Migrate to a hatch-based build (#374)
- Use standard
__main__.py
module (#375) - Switch to Ruff for linting (#383)
- Stop using Python's undocumented parse_template re function (#378)
- Resolved newline and encoding issues for running tests on Windows (#379)
- Capture legacy single-quoted predicates longer than 1 character (#373)
- Quote SimpleMRS predicates with reserved characters (#372)
Release date: 2023-05-29
- Bump versions of
actions/setup-python
(and others) in actions (#364)
- Escape/unescape quoted strings in SimpleMRS (#367)
Release date: 2023-01-08
- Added Python 3.11 support
delphin.tdl.ConsList.values()
anddelphin.tdl.DiffList.values()
now treat explicit sublists as regular items instead of descending into their structures (#357)- Implicit optional types are made explicit (#360)
- TDL parsing now models line and block comments (#356)
- TDL formatting now formats
LineComment
andBlockComment
classes (#356)
Release date: 2022-10-13
Updates Python support to currently active releases. Includes
delphin.highlight
(adds a dependency on Pygments), delphin.edm
,
and delphin.codecs.dmrstikz
directly instead of as separate plugins.
delphin.highlight
for syntax highlighting; it is no longer necessary to install this as a plugin (#344)delphin.edm
for elementary dependency matching; it is no longer necessary to install this as a plugin (#344)delphin.codecs.dmrstikz
for exporting DMRS with tikz-dependency; it is no longer necessary to install this as a plugin (#344)executable
parameter todelphin.commands.process()
(#352)--executable
option todelphin process
command (#352)
- The
mkprof
command no longer raises an error on an empty sentence (#335) - EDS conversion in
delphin.edm
now more robustly handles errors
Release date: 2021-09-30
- REPP mask (
=
) operator and full masking support (#331)
- SimpleDMRS no longer requires
index
ortop
to be specified when decoding (#334) - DMRX codec now conforms to the DTD regarding the upper/lower case of attributes (#333)
- REPP no longer requires iterative group calls to appear after the group definitions (#308)
Release date: 2021-01-05
delphin.tsdb.write_schema()
always opens files in UTF-8 (#324)
Release date: 2020-12-30
- Added Python 3.9 support
delphin.eds.EDSWarning
delphin.codecs.eds
now reads and writes identifiers (#323)--no-predicate-modifiers
option fordelphin convert
delphin.codecs.eds
now reads EDSs without tops (related to #316)delphin.eds
conversion from MRS ignores broken HCONS (#319)delphin.tsdb.read_schema()
always opens files in UTF-8 (#324)
delphin.codecs.eds
no longer outputs:
when top isNone
(related to #316)delphin.codecs.eds
now defaults toindent=True
delphin.eds.from_mrs
backs off to index as top if MRS top isNone
(#316)delphin.eds.from_mrs
defaults topredicate_modifiers=True
- All semantics codecs now use indentation and blank lines in between by default
*-lines
codecs now ignore the--indent
option
--predicate-modifiers
; with predicate modification is now the default for EDS
Release date: 2020-08-20
delphin.codecs.dmrx
now actually suppresses properties whenproperties=False
(#306); thanks to @arademaker
Release date: 2020-07-20
delphin.commands.process
now has areport_progress
parameter, defaulting toTrue
, for printing a progress bar (#304)delphin.itsdb.TestSuite.process()
now has acallback
parameter, called for each response during processing, which can be used to implement a progress bar (among other things) (#304)
delphin.repp
better anticipates unmatched capture groups (#301)delphin.dmrs.from_mrs()
no longer crashes on bad HCONS (#303)delphin.codes.simplemrs
is more robust to bad predicate strings, but there are still limits (#302)
delphin.itsdb.TestSuite.process()
no longer prints a progress bar, leaving it instead to the caller via thecallback
parameter; since the progress bar is a side effect this is not a breaking change (#304)
Release date: 2020-07-01
delphin mkprof
no longer drops last column when using --delimter with a delimiter other than@
(#288)- MRS to DMRS conversion raises a
DMRSWarning
instead of a KeyError when an EP has no intrinsic variable (#289) delphin.mrs.is_isomorphic()
works on disconnected graphs (#296)
delphin.tfs.FeatureStructure
raises aTFSError
when attempting to assign a value on a non-subscriptable feature value (#293)delphin.tsdb.format()
formatsdatetime.date
objects in the TSDB date format (#291)delphin.tsdb.write()
no longer requires thefields
parameter if writing to an existing test suite directory (#290)delphin.tdl.iterparse()
will raise a more informative TDLError from a RecursionError when parsing (#294)
Release date: 2020-05-12
delphin.tsdb.open()
does not use universal newlines (#285)
Release date: 2020-04-08
delphin.itsdb.FieldMapper
now has asource
parameter (#283)delphin.itsdb.TestSuite.process()
displays a progress bar when not logging individual items (#282)
delphin process -e
no longer requires awhere
condition (#281)
- Data loss can occur when writing a TSDB database with invalid
:date
values. Workaround: fix the dates. (#279)
Release date: 2020-03-03
delphin.ace.ACETransferer
now has astderr
parameter (#278)delphin.ace.ACEGenerator
now has astderr
parameter (#278)
delphin.itsdb.match_rows()
accepts either anint
orstr
for thekey
parameter. This was always the case, but now it's documented and typed properly.
Release date: 2020-01-22
Bug fixes for recent Python versions and for the delphin mkprof
command, and more user-friendly error messages from all delphin
commands.
delphin.util.LookaheadIterator
no longer raisesRuntimeError
in Python 3.7+ (#275)delphin.commands.mkprof()
suppresses duplicate records (#273)
delphin
commands catchPyDelphinException
and print its message without the stacktrace unless logging is at DEBUG (#276)delphin.commands.process()
raises aCommandError
if thegrammar
argument is not a file (#276)delphin.commands.process()
raises aCommandError
if thesource
ortestsuite
arguments are not valid TSDB database paths (as appropriate) (#276)delphin.commands.process()
will create a new directory ifsource
is given andtestsuite
is a non-existing pathdelphin.commands.process()
raises aCommandError
if theselect
query has a column or relation invalid for the schema (#276)delphin.commands.compare()
raises aCommandError
if thetestsuite
orgold
arguments are not valid TSDB databases or database paths (#276)
Release date: 2020-01-16
Removes Python 3.5 support, adds Python 3.8 support, adds the cli
namespace, fixes some issues with MRS and DMRS, an expands formatting
options for delphin convert
.
- Removed Python 3.5 support (#219)
- Added Python 3.8 support
delphin.util.inspect_codecs()
(#270)delphin.util.import_codec()
(#270)delphin.cli
namespace and modules for existing commands (#269)-lines
codec suffix fordelphin.commands.convert()
(#271)
delphin.codecs.edspenman
now properly reads predicate namesdelphin.codecs.edspenman
anddelphin.codecs.dmrspenman
now wrapPenmanError
inPyDelphinException
(#266)delphin.mrs.MRS.quantification_pairs()
detects and ignores when quantifier(s) are shared by multiple EPs (#267)delphin.dmrs.from_mrs()
detects when an INDEX is specified but is not the intrinsic argument of any EP (#267)
delphin.codecs.dmrspenman
update to Penman v0.9delphin.codecs.edspenman
update to Penman v0.9delphin.codecs.edspenman
anddelphin.codecs.dmrspenman
now only encode a graph's primary component (#268)delphin.main
now detects command modules declared in thedelphin.cli
namespace (#269)--indent
option todelphin convert
can take"no"
or"none"
to encode without newlines (#271)
Release date: 2020-01-07
Removes the NetworkX dependency, resolves some TSQL bugs, and adds some features to Derivations.
requirements.txt
mainly to try and help GitHub detect dependenciesdelphin.derivation.UDFNode.parent
(#245)delphin.derivation.UDFNode.internals()
(#246)delphin.derivation.UDFTerminal.parent
(#245)
delphin.mrs.is_isomorphic()
no longer uses NetworkX (#263)- Docs no longer require the
sphinx_autodoc_typehints
package as of Sphinx 2.2.0 (#264) delphin.exceptions.PyDelphinSyntaxError
now puts the ^ marker in the right spot.- Lexing in
delphin.util
now tracks the original line with each token, allowing for more informative syntax errors. delphin.tsql.select()
will raise aTSQLError
if a condition's type does not match that of the column it checks (#261)delphin.tsql.select()
now considersNone
values when checking conditions (#262)
Release date: 2019-11-29
Resolves some more REPP bugs, improves logging, and ensures the code statically type-checks.
[repp]
installation extradelphin.repp.REPPWarning
classdelphin.repp.DEFAULT_TOKENIZER
module variabledelphin.repp.REPP.tokenize_result()
method to tokenize using the result of rule applicationdelphin.util.make_highlighter()
to handle getting Pygments highlighters--color
option andcolor
parameter for therepp
command
- REPP now computes alignments even when substitution inserts nothing (#252)
- REPP now uses the
regex
library if available (#253) delphin.tsdb.unescape()
doesn't incorrectly parse\\
followed bys
orn
(#257)
- The default logging for the main script is now
ERROR
(was:WARNING
) delphin.tsdb.cast()
now raises an error if the value to cast is not a string orNone
delphin.tsdb.Relation
is now a class instead of just a type declaration, but its existence is still just for type-checking
Release date: 2019-08-21
Resolves a REPP processing bug and improves REPP performance.
delphin.repp.REPP
no longer raises an IndexError when the replacement does not use all group references (#250)
delphin.repp.REPP
no longer recomputes alignments for unchanged strings, boosting performance 2-3x.
Release date: 2019-08-15
Resolves some bugs related to DMRS-to-MRS conversion.
delphin.dmrs.DMRS.arguments()
no longer raises a NameError (#247)delphin.dmrs.DMRS.scopal_arguments()
returns correct labels (#249)delphin.mrs.from_dmrs()
assigns the correct top handle (#248)
delphin.mrs.MRS
can now be instantiated with an empty structure
Release date: 2019-08-14
This is the largest release of PyDelphin yet, with over a year of work and several years of ideas worked in. The changes are so numerous that a normal CHANGELOG entry would only make it harder to understand what is different, and so many changes are breaking that it would be counterproductive to mark those that break backward compatibility. Rather, users should treat PyDelphin v1.0.0 as an entirely new API (that is, assume the entire API is incompatible with the previous version). And yet, there are rather few new features introduced in this release.
Two goals of this release are to fix design decisions that users had
found less than ideal, and to improve the codebase's maintainability
for the future. As part of the first goal, the package hierarchy has
been flattened (e.g., the dmrs
package is no longer under mrs
) and
the semantic representations are given their own data structures
instead of being converted to an intermediate representation. As part
of the second goal, delphin
was made a namespace package,
PEP-8 style conventions
were applied throughout, and every part of the public API was
documented.
- Semantics
- There is no more intermediate
Xmrs
data structure - MRS, DMRS, and EDS are independent data structures but they implement common interfaces
- A new
delphin.scope
module defines scope operations - DMRS and EDS are moved to the
delphin.dmrs
anddelphin.eds
packages, respectively - All unshared semantic components (EPs, Nodes, etc.) are defined by
their respective packages (
delphin.mrs.EP
,delphin.dmrs.Node
,delphin.eds.Node
, etc.) - Abstract classes are defined in
delphin.sembase
anddelphin.scope
- Shared components get their own modules (
delphin.lnk
,delphin.predicate
, etc.)
- There is no more intermediate
- Serialization
- All serialization codecs for semantics representations are now
under
delphin.codecs
, which is a namespace package - These implement a common "Codec API" which allows additional codecs to be installed as plugins
- All serialization codecs for semantics representations are now
under
- Test Suite Databases
- Low-level operations are defined in
delphin.tsdb
- SQL-database-like operations are defined in
delphin.itsdb
- The incremental API of
delphin.itsdb.TestSuite
is simplified; Rows are now immutable, Tables are always backed by files (either named or temporary), and writing to disk only happens via theTestSuite.commit()
method - Table joins for complex queries are now entirely handled by
delphin.tsql
- Filter and Applicator functionality is removed, but the filtering
is handled better by
delphin.tsql
- Low-level operations are defined in
- Interfaces
- Common interface classes are now in
delphin.interface
- The ACE interface is moved up to
delphin.ace
delphin.ace
now supports full-forest parsing- The web interface is no longer called "RESTful" (because it's far
from it) and is moved to
delphin.web.client
- A web server is implemented at
delphin.web.server
- Common interface classes are now in
- Hierarchies
- A new
delphin.hierarchy
module for multiple-inheritance hierarchies - The hierarchy implementation is used for
delphin.semi
anddelphin.tfs
for computing subsumption and type compatibility
- A new
- Other Removals Not Listed Above
delphin.mrs
submodules:compare
,components
,config
,path
,query
,util
; some functions are moved todelphin.mrs
delphin.extra
, but functionality is available as plugins:delphin.sh
scripttox
-based testing- Various methods and function parameters may be removed; please consult the API documentation
Release date: 2019-04-01
- Added Python 3.7 support
delphin.interfaces.ace.AceProcessError
for unrecoverable ACE crashes (#181)- ACE command-line options are allowed with
delphin process --options=...
and indelphin.commands.process(..., options=...)
(#180) delphin.itsdb.Record.from_dict()
delphin.itsdb.Table
(#186)write()
attach()
detach()
commit()
is_attached()
list_changes()
- Various methods to replace
list
functionality:append()
,extend()
,__len__()
,__getitem__()
,__setitem__()
, and__iter__()
delphin.itsdb.TestSuite.process()
thegzip
andbuffer_size
parameters-z
/--gzip
option to thedelphin process
command
delphin.mrs.eds
parsing of predicates and empty property lists (#203)delphin.commands.convert
wrap the inner step of conversion in a try-except block to more gracefully handle crashes on a single input. (#200)delphin.itsdb.TestSuite.write()
re-enable theappend
parameter
- BREAKING
name
parameter ondelphin.itsdb.Table
. Thename
attribute is still available as it is taken from the table's schema.
- BREAKING
delphin.itsdb.Table
is no longer a subtype oflist
, meaning that some list-like behavior is gone. Most relevant functionality is recreated (e.g.,append()
,extend()
,__getitem__()
,__len__()
, etc.) - BREAKING
delphin.itsdb.Record
can no longer be instantiated with a dict with column data; useRecord.from_dict()
- BREAKING
delphin.itsdb.Record
stores data as strings, always retrieves by default as cast types. UseRecord.get(..., cast=False)
to get the raw string value.
delphin.mrs.convert()
usedelphin.commands.convert
instead
Release date: 2018-10-31
delphin.tfs.TypedFeatureStructure
no longer duplicates attributes on__slots__
- TDL identifiers are reverted to the more permissive blacklist pattern (#192)
- TDL identifiers, coreferences, and 'symbols now use the same pattern (#191)
- Import package information from
delphin/__about__.py
intodelphin/__init__.py
(#190)
Release date: 2018-10-20
This release introduces a completely redone TDL parser that follows
the description of TDL syntax at
https://github.com/delph-in/docs/wiki/TdlRFC based on recent
discussions on the DELPH-IN mailing list (links to these discussions
are at the bottom of the linked wiki). In addition, there are three
other major introductions: delphin.commands
, which gives
programmatic access to the delphin
command-line utilities;
delphin.tsql
, which implements a subset of the TSQL query language
(see https://github.com/delph-in/docs/wiki/TsqlRfc) that now replace
the --filter options for certain commands; and the new TypeHierarchy
class in delphin.tfs
. Improvements to the delphin.itsdb.TestSuite
class now give it feature-parity with the ItsdbProfile
class it
replaces. See the rest of the changelog for additional improvements.
delphin.tdl.parse()
now accepts a filename argument and returns a properly functioning generator (#104)delphin.itsdb
works better with gzipped tables with Python 2delphin.mrs.penman
no longer callsEds.from_xmrs(x)
whenx
is anEds
tests/tdl_test.py
unit tests intended to replacetests/tdl_test.md
delphin.tdl.TdlType.docstring
contains a list of a type's docstringsdelphin.tdl.parse()
now takes anencoding
parameter (#172)delphin.tdl.iterparse()
for new-style TDL parsing (#153, #167, #168, #170)delphin.tdl.format()
for TDL serialization (#82, #187)- Updated TDL entity classes: (#168)
delphin.tdl.Term
delphin.tdl.TypeIdentifier
delphin.tdl.String
delphin.tdl.Regex
delphin.tdl.AVM
delphin.tdl.ConsList
delphin.tdl.DiffList
delphin.tdl.Coreference
delphin.tdl.Conjunction
delphin.tdl.TypeDefinition
delphin.tdl.TypeAddendum
delphin.tdl.LexicalRuleDefinition
delphin.tdl.LetterSet
delphin.tdl.WildCard
delphin.tdl.TypeEnvironment
delphin.tdl.InstanceEnvironment
delphin.tdl.FileInclude
- TDL parameters:
delphin.tdl.LIST_TYPE
(default:"*list*"
)delphin.tdl.EMPTY_LIST_TYPE
(default:"*null*"
)delphin.tdl.LIST_HEAD
(default:"FIRST"
)delphin.tdl.LIST_TAIL
(default:"REST"
)delphin.tdl.DIFF_LIST_LIST
(default:"LIST"
)delphin.tdl.DIFF_LIST_LAST
(default:"LAST"
)
delphin.tfs.FeatureStructure
, since the type ofTypedFeatureStructure
was unused;TypedFeatureStructure
now inherits fromFeatureStructure
delphin.tfs.FeatureStructure.features()
(as well as thefeatures()
methods onTypedFeatureStructure
,AVM
,Conjunction
, andTypeDefinition
) now take a booleanexpand
argument which, ifTrue
, expands all feature paths.delphin.tfs.TypeHierarchy
with basic tests (#93)delphin.exceptions.TdlWarning
for notifications about deprecated TDL syntaxesdelphin.util.LookaheadIterator
for parsing with arbitrary lookaheaddelphin.commands
module to contain logic fordelphin
commands (#140)tests/commands_test.py
to test invocation of commands (but not results)delphin.util.detect_encoding
and tests for checking file header for encoding information (#169)delphin.tsql
module for TSQL queries of testsuitesdelphin.exceptions.TSQLSyntaxError
delphin.itsdb
Relations.find()
returns the names of tables defining a fieldRelations.path()
returns a path of(table, shared_field)
tuples describing how to get from one table to another via shared keysTestSuite.write()
takes an optionalrelations
parameter to write a profile with an updated relations file (#150)TestSuite.exists()
(#150)TestSuite.size()
(#150)Record.get()
takes acast
parameter; whenTrue
, values are cast to the field's datatypeselect_rows()
takes acast
parameter as withRecord.get()
delphin.tdl
now parses triple-quoted docstrings (#167); note that it no longer parses the old-style docstringsdelphin.tdl.TdlDefinition
inherits fromdelphin.tfs.FeatureStructure
delphin.itsdb.TestSuite
no longer casts values by default (see note onRecord.get()
above)delphin.itsdb.TestSuite.process()
can take aTable
as thesource
instead of justTestSuite
.- BREAKING The
delphin
commands have all replaced the previous method of filtering testsuites with the new TSQL queries. Applicators are no longer available to commands. Please seedelphin <cmd> -h
for updated usage notes. (#138, #179)
- BREAKING
delphin.tdl.TdlDefinition.comment
; replaced byTdlType.docstring
- BREAKING
--filter
option on all commands - BREAKING
--apply
option on all commands - BREAKING
--join
option on theselect
command recipes/
directory
Release date: 2018-08-23
This release improves EDS support, cleans up the code, makes the codecs consistent and makes predicate support harmonious with Delphin. This is the first release by the new maintainer, Angie McMillan-Major.
delphin.mrs.eds
:dump()
anddumps()
take ashow_status
parameter which turns on the annotation of disconnected graphs and nodes (#157)delphin.mrs.eds
:Eds.from_xmrs()
,dump()
anddumps()
take apredicate_modifiers
parameter which enables the use of a function to add additional edges in order to join disconnected graphs (#156)delphin.mrs.eds.non_argument_modifiers()
is the default method for EDS predicate modification, but it also works (with different parameters) for DMRS-like edges.- The
convert
command can take a--show-status
option which annotates disconnected graphs and nodes when--to=eds
- The
convert
command can take a--predicate-modifiers
option which attempts to rejoin disconnected EDS graphs that fit certain criteria - Documentation for implementing an ACE preprocessor (#91)
ace
as a--from
codec for theconvert
subcommand, which reads SimpleMRS strings from ACE output (#92)
- Converting with
--to=eds
no longer shows disconnected graphs and nodes by default (see--show-status
above) - Representative node selection for DMRS and EDS considers the scope hierarchy when looking for candidate nodes
delphin.mrs.xmrs.Xmrs.from_xmrs()
anddelphin.mrs.eds.Eds.from_xmrs()
now take a**kwargs
argument to facilitate theconvert
command (#160)- The following
delphin.tdl
functions are now private:delphin.tdl._parse_avm()
,delphin.tdl._parse_affixes()
,delphin.tdl._parse_typedef()
,delphin.tdl._parse_attr_val()
,delphin.tdl._parse_cons_list()
,delphin.tdl._parse_conjunction()
,delphin.tdl._parse_diff_list()
(#81) - BREAKING
delphin.interfaces.ace.AceProcess
whitelists certain command-line arguments for ACE; invalid arguments or values raise a ValueError. This could break code that uses options not whitelisted, but such code probably wouldn't work anyway. (#149)
- Converting to PENMAN via the
convert
command should no longer crash for disconnected graphs, but print a log message to stderr, print a blank line to stdout, and then continue (#161) - Updated the docstrings for
delphin.mrs.xmrs.Xmrs.args()
,delphin.mrs.xmrs.Xmrs.outgoing_args()
, anddelphin.mrs.xmrs.Xmrs.incoming_args()
, from "DMRS-style undirected links" to "MOD/EQ links" and updated the return value ofXmrs.args()
andXmrs.outgoing_args
from{nodeid: {}}
to{role: tgt}
(#133) delphin.mrs.compare.isomorphic()
compares predicates using normalized form- Updated the code and the docstrings for references to 'string' and 'grammar' predicates to refer to 'surface' and 'abstract' predicates (#117)
delphin.tdl.parse()
now accepts either a file or a filename argument (#104)- The following dump methods now allow either a file or filename as their
arguments like
delphin.mrs.penman.dump()
:delphin.mrs.eds.dump()
,delphin.mrs.simplemrs.dump()
,delphin.mrs.simpledmrs.dump()
,delphin.mrs.mrx.dump()
,delphin.mrs.dmrx.dump()
,delphin.mrs.prolog.dump()
(#152) - Non-ascii XML output is now able to be processed in Python2 (#106)
delphin.interfaces.ace
now validates parser, transfer, and generator inputs and refuses to process invalid inputs (#155)delphin.interfaces.ace
handles whitespace in s-expressions a bit betteritsdb.get_data_specifier()
now allows unicode arguments in Python2 (#164)
delphin.mrs.query.intrinsic_variable()
; probably should have been deprecated in v0.4.1.delphin.mrs.components.Pred.string_or_grammar_pred()
; replaced withdelphin.mrs.components.Pred.surface_or_abstract()
delphin.mrs.components.Pred.stringpred()
; replaced withdelphin.mrs.components.Pred.surface()
delphin.mrs.components.Pred.grammarpred()
; replaced withdelphin.mrs.components.Pred.abstract()
Release date: 2018-06-12
This is a very minor release that just fixes one bug introduced in v0.7.1.
- ACE interface no longer gives unnecessary error message when reading the run info from the first line of output (#148)
Release date: 2018-06-09
There were some bugs in the last release, particularly with Python 2.7, which
have been addressed in this release. There is one significant new feature,
which is the ability to process [incr tsdb()] profiles, either with the
process()
method on TestSuite
objects or via the new process
command.
delphin.interfaces.ace.AceProcess.run_infos
stores information related to each run of an AceProcess, such as the machine architecture, user name, and start/end times; this info is made available via therun
key in response objectsdelphin.interfaces.ace.AceProcess.run_info
accesses the run information of the currently running process, or the last process if it has already endeddelphin.interfaces.base.Processor
is the base class for the ACE and REST processor interfaces and introduces thetask
member andprocess_item()
functiondelphin.util.SExpr
now has aformat()
method which takes basic objects (as fromSExpr.parse()
) and formats them in the lisp notationdelphin.interfaces.base.FieldMapper
for mapping interface response objects to [incr tsdb()] (table, rowdata) tuples.delphin.itsdb.TestSuite.process()
function for using a processor (e.g., AceParser) to process each item in the testsuite.- Add
process
command to main script
delphin.itsdb.Record
can now accept a mapping of field names to values for instantiation, and the column indices will be looked up from the schemadelphin.itsdb.Record
now validates field data (and tests are added)delphin.itsdb.Record
values can be set by the field name and indexace.AceProcess
andrest.DelphinRestClient
indelphin.interfaces
now inherit frombase.Processor
(#141)delphin.itsdb.ItsdbProfile
takes an optionalcast
keyword argument; this class is deprecated, but the addition is to smooth over the transition to the newTestSuite
class.- Clarified the documentation and code for
delphin.itsdb.TestSuite.write()
regarding the specifications of tables and/or data. - Reverted an incomplete rewrite of
delphin.itsdb.make_skeleton()
- Replaced
delphin.util.SExpr
with a custom non-PEG parser, which seems to be much faster for pathological items (#145) - BREAKING
ItsdbProfile
,TestSuite
, andTable.from_file()
indelphin.itsdb
now accept an encoding parameter, which defaults toutf-8
. Profiles will be read and written using the specified encoding, instead of using whatever is defined by the locale. This should only be a breaking change if your preferred locale is neitherascii
norutf-8
. - BREAKING
ItsdbProfile
andTestSuite
indelphin.itsdb
delete extra table files on writing (e.g., ifitem.gz
is written,item
will be deleted if it also exists). This is only breaking if anyone relied on having both the gzipped and regular versions of tables.
- The
mkprof
command now correctly makes non-full profiles. - The
mkprof
command is now more Python 2.7-compatible - Made
delphin.itsdb
more compatible with Python 2.7
Release date: 2018-05-08
This release adds a number of features. The main ones include a redone [incr tsdb()] module, Prolog MRS export, and a REPP tokenizer. This release also removes Python 3.3 support and adds Python 3.6 support, and removes or mitigates several dependencies.
- Removed Python 3.3 support
- Added Python 3.6 support
delphin.interface.ace.compile()
can takeexecutable
andenv
parameters, similar toace.parse()
, etc. (#119)remap_nodeids
parameter toDmrs.from_triples()
, which defaults toTrue
, indicates whether the nodeids used in the triples should be coerced into standard DMRS integer ids--select
option toconvert
command for non-standard profile schemata- Ensure the
properties=True|False
parameter existed for dump() and dumps() for all MRS codecs; default value may differ (#114) - Add
--no-properties
option to delphin convert command; default is to always print properties (which may be different from the API function default) (#114) delphin.itsdb.Relations
class for encoding/decoding relations files, which now also work on strings instead of actual files (#99)delphin.itsdb.Relation
class for storing the relations of a single tabledelphin.itsdb.Record
,delphin.itsdb.Table
, anddelphin.itsdb.TestSuite
for modeling [incr tsdb()] substructures (#89)delphin.itsdb.join()
does inner and left joins (#101)delphin.itsdb.Field.default_value()
replacesdelphin.itsdb.default_value()
delphin.util.deprecated
decorator for marking deprecated functions and methods- DMRX now encodes index as a graph attribute (#126)
- DMRS's dictionary view (for JSON output) now encodes index as a top-level attribute.
delphin.mrs.prolog
serializer (#8)delphin.repp
for REPP tokenization (#43)delphin.exceptions.ReppError
delphin.exceptions.ReppWarning
- Nodeids in Xmrs structures are no longer constrained to be integers
delphin.itsdb
now has public-facingtsdb_core_files
andtsdb_coded_attributes
variablesmkprof
command includes any non-empty core files in skeletons- SimpleMRS codec now instantiates with the Mrs class instead of Xmrs (#103)
- SimpleMRS no longer breaks at non-breaking spaces in predicates (#128)
- Remove docopt dependency for command-line interfaces (#137)
- Move imports of dependencies to avoid unnecessary ImportErrors (#100)
- BREAKING: for
delphin.itsdb.Field
, theother
list attribute is now just the booleanpartial
since there's no other use of it - Add a few more patterns to
.gitignore
- Remove unnecessary line in
delphin.main.mkprof()
- BREAKING: Insert
top
,index
, andxarg
parameters into thedelphin.mrs.Dmrs
class instantiator before thelnk
parameter; other arbitrary parameters are now disallowed - BREAKING: SimpleDMRS format encodes top, index, xarg, lnk, and
surface as graph attributes and removes the top link (
0:/H -> ...
) - The
delphin
command no longer catches errors when converting; it was catching and hiding errors that were not intended to be hidden
- Corrected docstrings that had been misplaced in delphin.mrs.xmrs for over a year (#116)
- Non-integer nodeids no longer break sorting and construction
- Fix a bug in EDS getting CVARSORT when properties are printed
- Use target relations for writing empty files in
mkprof
command (#125) - Properly split role and post in Dmrs.from_triples()
- Use top-specifying triples (e.g. (0, 'top', 10000)) in Dmrs.from_triples()
- Don't complain about missing POS field in Preds (#129)
- No longer print ARG0s twice in MRX
- Let MRX deal with missing TOP and INDEX
- BREAKING `delphin.interfaces.ace._AceResult (#97)
- BREAKING `delphin.interfaces.ace._AceResponse (#97)
delphin.itsdb.get_relations()
- usedelphin.itsdb.Relations.from_file()
delphin.itsdb.default_value()
- usedelphin.itsdb.Field.default_value()
delphin.itsdb.make_skeleton()
- build aTestSuite
and write the core tables (this will be made more convenient later)delphin.itsdb.filter_rows()
delphin.itsdb.apply_rows()
delphin.itsdb.ItsdbProfile
- usedelphin.itsdb.TestSuite
delphin.itsdb.ItsdbSkeleton
- usedelphin.itsdb.TestSuite
Release date: 2017-06-02
delphin.itsdb.ItsdbProfile.exists()
(#112)delphin.itsdb.ItsdbProfile.size()
(#112)--in-place
option to thedelphin mkprof
command (#109)delphin.derivation.UdfNode.preterminals()
(#105)delphin.derivation.UdfNode.terminals()
(#105)
- Hash on the normalized form of Preds. (#107)
- Properly call
re.sub()
so the flags don't become the count (#108) - Include file size of gzipped tables in summary of
delphin mkprof
(#110) normalize_pred_string()
now strips_rel
(#111) and lowercasesis_valid_pred_string()
no longer requires_rel
(#111)
Release date: 2017-04-06
This minor release fixes a number of bugs with the ACE interface and a number of small bugs that came up during testing. While a minor release, one new (minor) feature is added: an AceTransferer and associated functions.
delphin.interfaces.ace.AceTransferer
- due to a limitation with ACE, only the regular (non-tsdb) mode is allowed in transferdelphin.interfaces.ace.transfer()
delphin.interfaces.ace.transfer_from_iterable()
delphin.interfaces.ace
no longer captures stderrdelphin.interfaces.ace
attempts to restart a process that closed unexpectedly
delphin.interfaces.ace
ignores stderr, which effectively fixes (#86)delphin.interfaces.ace
joins content lines in tsdb mode---fixes (#95)- Write empty tables for
delphin mkprof
command unless--skeleton
is used (fixes #96) delphin.mrs.xmrs.Xmrs
equality test now checks variable propertiesdelphin.mrs.xmrs.Mrs.from_dict()
correctly reads variable properties (#98)delphin.interfaces.ace._AceResponse.get()
now backs off to ParseResponse on KeyErrordelphin.mrs.simplemrs
fix error message on unexpected token
Release date: 2017-01-20
This release replaces the top-level pyDelphin
and mrs.py
scripts
with delphin.sh
(when installed, a delphin
command is made available
that accomplishes the same thing). The PENMAN codec is introduced for
DMRS and EDS. SEM-I and VPM modules are added with tests, but proper
subsumption comparisons aren't available until type hierarchies are also
added. Finally, various bugs and inconsistencies in MRS components are
fixed or the functionality is deprecated.
delphin.sh
top-level script (replaces the formerpyDelphin
andmrs.py
)delphin.main
module for script usagemrs-json
,dmrs-json
, andeds-json
codecs for theconvert
script commanddmrs-penman
andeds-penman
codecs for theconvert
script command- Skeleton creation from sentence lists in the
mkprof
script command delphin.mrs.xmrs.Xmrs.from_xmrs()
(meant to be used by subclasses)delphin.mrs.xmrs.Dmrs.to_triples()
delphin.mrs.xmrs.Dmrs.to_triples()
delphin.mrs.eds.Eds.to_triples()
delphin.mrs.eds.Eds.from_triples()
delphin.mrs.penman
module for PENMAN serialization of DMRS and EDS (resolves #85)delphin.vpm
and testsdelphin.semi
and tests
- Filters and applicators in the
select
,mkprof
, andcompare
script commands now have the formtable:col=expr
instead of taking two arguments - The
mkprof
script command produces skeletons by default, to mimic art'smkprof
tool. delphin.extra.latex
has nicer looking DMRS output- Quantifiers are detected more consistently for, e.g., DMRS conversion; this mostly resolves (#84)
- DMRS
/EQ
links are nowMOD/EQ
and fix a direction (resolves #87) - All *MRS serializers/exporters take **kwargs (though many ignore them) so that a common API can be used for, e.g., *MRS conversion.
- Strip quotes on reading CARGs, add them when writing (fixes #75)
delphin.interfaces.ace
now detects interleaved stderr messages when there are errors decoding or parsing S-Expressions (fixes #86)- Custom test runner in
setup.py
; now just calltox
pyDelphin
top-level script (seedelphin.sh
)mrs.py
top-level script (seedelphin.sh
)- @total_ordering decorator on
delphin.mrs.components.Node
anddelphin.mrs.components.ElementaryPredication
, which provided comparisons for__gt__
,__ge__
, and__le__
(__lt__
was defined), is removed, but it didn't do much anyway because__eq__
was not also defined on these classes.
delphin.mrs.components.Pred.is_quantifier()
delphin.mrs.components.Node.is_quantifier()
delphin.mrs.components.Node.__lt__()
delphin.mrs.components.ElementaryPredication.__lt__()
Release date: 2016-07-19
This minor release adds support for getting more parse information
from ACE (via the ACE 0.9.24's --tsdb-stdout
), updates derivation
objects so UDX fields (e.g. type
) can appear on all nonterminals,
and adds support for YY token lattices.
delphin.derivation.UdfNode.type
stores UDX grammar type infodelphin.derivation.UdfNode.to_udx()
serializes with UDX extensionsdelphin.derivation.UdfNode.to_dict()
now allows an optionallabels
parameter for embedding short labelsdelphin.interfaces.base
general interface helper classes (e.g. response classes)delphin.tokens
encodes/decodes YY token lattices- Support for retrieving tokens and labeled trees from REST client.
delphin.util.SExpr
S-Expression parser
delphin.derivation.UdfNode.is_head()
now considers siblingsdelphin.derivation.UdfNode.entity
returns only the entity (e.g. for UDX), not the type or head infodelphin.derivation.Derivation.from_string()
decomposes UDX entities and stores the type and head info separatelydelphin.derivation.Derivation.from_dict()
now considerestype
andhead
attributesdelphin.derivation.UdfNode
normalizes entity case for comparisondelphin.interfaces.ace
now returns a response object (like the RESTful interface) instead of just a dict- ACE interface also supports the
--tsdb-stdout
and--report-labels
options for future versions of ACE.
delphin.derivation.UdfNode
is_head() now works for JSON-encoded derivations.
delphin.lib.six
was barely used, so is removed (and relevant Python 2 compatibility measures were made more consistent)
delphin.derivation.UdfNode.basic_entity()
(use UdfNode.entity)delphin.derivation.UdfNode.lexical_type()
(use UdfNode.type)
Release date: 2016-06-19
delphin.interfaces.rest
(#66)delphin.mrs.xmrs.Mrs
:to_dict()
andfrom_dict()
methods (#68)delphin.mrs.xmrs.Dmrs
:to_dict()
andfrom_dict()
methods (#68)delphin.mrs.eds
(#25, #26)delphin.lib.pegre
Pegre parsing framework to help with EDS deserializationproperties
property accessor ondelphin.mrs.components.Node
delphin.mrs.xmrs.Mrs
is now a subclass of Xmrsdelphin.mrs.xmrs.Dmrs
is now a subclass of Xmrsdelphin.mrs.components.Node
no longer coercesnodeid
to an integer (sinceNode
is used by EDS as well)delphin.mrs.dmrx
now casts nodeids to integers (see above)delphin.mrs.xmrs.Xmrs.properties()
can take anas_list=True
parameter to return the properties as a list instead of as a dict (to preserve the original order)delphin._exceptions
is nowdelphin.exceptions
- Renamed a number of objects meant to be internal so their
identifiers start with
_
(e.g.delphin.derivation._UdfNodeBase
)
- Fixed a regression in reading multiple SimpleMRSs (#70)
delphin.mrs.components.Pred
short_form()
now works as expected when the predicate is already short (e.g. has no_rel
suffix)- Short and full preds are now compared as equal
delphin.mrs.xmrs.Xmrs.outgoing_args()
no longer tries to removeCARG
from the argument dict twice.delphin.derivation
improve modeling of terminal nodes
- Added or updated documentation throughout. Coverage is not complete, but should be significantly better.
Release date: 2016-04-21
This release fixes a number of bugs and adds some minor features. The
delphin.mrs.query
module has also been fixed and tested to work with
the current version.
delphin.mrs.xmrs
Xmrs.nodeids()
Xmrs.nodeid(iv)
Xmrs.validate()
tests.mrs_Dmrs_test
tests.mrs_query_test
errors=(ignore|warn|strict)
parameter for SimpleMRS deserialization; withwarn
orstrict
, it usesXmrs.validate()
to notify of errors
- Quantifiers in DMRS now always point to quantifiees.
delphin.mrs.components.VarGenerator
uses a default sort (u
) if none is givendelphin.itsdb.ItsdbProfile.join()
now raises anItsdbError
when the tables don't share a key- AceGenerator now correctly joins error messages
- The search in
Xmrs.is_connected()
is fixed mrs.path.walk()
now traverses multiple axes of the same namemrs.query
, fixed the following (also see Added tests):select_nodeids()
select_nodes()
select_eps()
select_args()
select_links()
select_hcons()
select_icons()
find_argument_target()
find_subgraphs_by_preds()
- HCONS and ICONS now serialize in the regular order; they were being reversed for some reason
- Improved label equality set head finding involving quantifiers
delphin.mrs.xmrs.Dmrs()
no longer creates unlinked TOPXmrs
now stores ICONS as IndividualConstraint objects (and HCONS, but this was already the case, but not made explicit)delphin.extra.latex.dmrs_tikz_dependency()
now accounts for multiple edges with the same source and target
mrs.query
find_quantifier()
(usexmrs.nodeid(..., quantifier=True)
)get_outbound_args()
(usexmrs.outgoing_args()
)nodeid()
(usexmrs.nodeid()
)
Release date: 2016-03-04
This release fixes a number of bugs (including fixes from two new contributors; see the README), and adds some minor features:
- more convenient introspection of TDL lists
- a LaTeX exporter for DMRS
From v0.4.0, pyDelphin uses semantic versioning, and is available on PyPI.
This release also drops support for Python 2.6 (Python 2.7 is still supported and tested).
delphin.extra.latex
is added for exporting to LaTeX; currently contains DMRS export viadmrs_tikz_dependency()
- TdlConsList and TdlDiffList classes are added, which make working
with list structures in TDL more convenient; e.g., the
values()
function returns a Python list of the elements (instead of having to get them viaREST.REST.FIRST
, etc.)
- Python2.6 support
- unused top-level util.py
Xmrs.subgraph()
no longer crashes when selecting only the top node- allow hyphens in long-style variable sorts (e.g.
ref-ind2
) dmrx.loads()
no longer fails for Python2- DMRS->MRS conversion no longer generates invalid labels for
transitive
*/EQ
links in particular orders - MrsPath walks don't no longer cross
/EQ
links twice - fix a bug in compound
ARG&ARG2
connectors in MrsPath
delphin.mrs.simplemrs
- uppercase variable property names
- don't print top-level
<-1:-1>
Lnk values for SimpleMRS 1.1 - normalize case for other features and role names
- EPs in Xmrs are stored as ElementaryPredication objects instead of plain tuples (with no significant drop in performance)
- VarGenerator uses next unused vid instead of next in sequence (i.e. it fills in gaps)
delphin.mrs.components.Pred
- comparison is now case-insensitive
- characters like
<
are now allowed inside a pred - don't allow the invalid
_relation
suffix, and pretend the_rel
suffix is there if it isn't
ElementaryPredication.is_quantifier()
looks for theRSTR
role; Pred and Node still look for aq
POS, since they don't have access to the arguments/links- added
__contains__()
method to TypedFeatureStructure to check for the presence of features - TDL parsing treats strings as primitives instead of as the supertype of some TypedFeatureStructure
Release date: 2015-08-25
This release simplifies the pyDelphin core classes and improves performance for many MRS tasks. Most significantly, the inspection ofXmrs objects by their components is done internally with basic tuple (or namedtuple) and dict types, but the old "classy" interface can be had with functions in delphin.mrs.components. This release also adds a module for working with derivation trees, improves Python 2 compatibility, and co-occurs with improved documentation and unit tests for pyDelphin.
- use setuptools for setup.py
- delphin.derivation (and associated tests)
- delphin.interfaces.ace.AceProcess
env
parameter for custom environment variables - delphin.mrs
- components.var_sort()
- components.var_id()
- components.sort_vid_split()
- components.VarGenerator
store
attribute - components.split_pred_string() (moved from the Pred class)
- components.is_valid_pred_string() (moved from the Pred class)
- components.normalize_pred_string() (moved from the Pred class)
- components.links()
- components.hcons()
- components.icons()
- components.nodes()
- components.elementarypredication()
- components.elementarypredications()
- compare.isomorphic
check_varprops
parameter - path.walk()
- path.reify_xmrs()
- path.merge()
- path.XmrsPathNode.depth()
- path.XmrsPathNode.order()
- util.rargname_sortkey()
- xmrs.Xmrs.outgoing_args()
- xmrs.Xmrs.incoming_args()
- delphin.itsdb.ItsdbSkeleton
- recipes/ package for small, useful snippets (which also show how to
use pyDelphin as a library)
- recipes.semantics.contiguous_semantic_constituents()
- tests.mrs_compare_test
- Python 2.6+ compatibility
- delphin._exceptions.TdlParsingError
- delphin.mrs.simplemrs no longer crashes if variable properties are specified on the HCONS or ICONS lists
- Xmrs now converts variable properties to lists on construction, in case a dict is given (which caused problems during serialization).
- delphin.mrs.components.normalize_pred_string() is more robust
- delphin.mrs
- Xmrs (significant changes, here's some of them)
- class parameters are now: (top, index, xarg, eps, hcons, icons, vars, lnk, surface, identifier)
- new composition functions: add_eps(), add_hcons(), add_icons()
- new access functions: ep(), pred(), hcons(), properties(), etc...
- (re)moved access functions: intrinsic_variables(), introduced_variables(), get_pred(), get_arg(), etc...
- components
- All (remaining) components for building MRS structures are now subclasses of namedtuples. This means the individual attributes cannot be reassigned (but mutable ones can be changed).
- Lnk can no longer be instantiated with non-standard types
- Lnk parameters are reversed: Lnk(type, data) (I don't remember why, though)
- VarGenerator stores properties as a list by default (as is done with Xmrs properties)
- is_valid_pred_string() is stricter in checking for valid preds
- config.QUANTIFIER_SORT renamed to QUANTIFIER_POS
- simplemrs.load() and loads() take a "strict" parameter (if True, more tests are performed during parsing)
- simplemrs.dump() and dumps() will output ICONS even with version=1.0
- dmrx.loads() no longer has an "encoding" parameter
- mrx
- loads() no longer takes an "encoding" parameter
- has (untested) support for hypothetical ICONS data
- query
- select_eps() and select_args() "anchor" parameter is renamed to "nodeid"
- select_icons() "target" and "clause" parameters renamed to "left" and "right", respectively
- Xmrs (significant changes, here's some of them)
- delphin.interfaces.ace
INPUT
key is added when AceProcess.interact() is called.- Generation response dictionaries are made consistent with parsing ones (including having dictionaries in RESULTS instead of just strings)
- delphin.tfs.TypedFeatureStructure
features()
now returns a list, and sub-AVMs are only descended into if there is one feature and no supertypes.
- delphin.tdl.TdlDefinition
features()
now returns a list, and sub-AVMs are only descended into if there is one feature and no supertypes.local_constraints()
now returns a list
- test now use pyTest for unittests (and doctests)
- delphin.mrs
- components.MrsVariable
- components.Hook
- components.AnchorMixin
- components.Argument
- components.Pred.split_pred_string() (moved to module function)
- components.Pred.is_valid_pred_string() (moved to module function)
- components.Pred.normalize_pred_string() (moved to module function)
- components.Node.properties
- components.ElementaryPredication.from_node()
- components.ElementaryPredication.sortinfo
- components.ElementaryPredication.properties
- components.ElementaryPredication.get_arg()
- components.ElementaryPredication.arg_value()
- components.ElementaryPredication.add_argument()
- config.ANCHOR_SORT
- config.QEQ (moved to components.HandleConstraint.QEQ)
- config.LHEQ (moved to components.HandleConstraint.LHEQ)
- config.OUTSCOPES (moved to components.HandleConstraint.OUTSCOPES)
- util.XmrsDiGraph
- path.XmrsPath
- path.XmrsPathNode.copy()
- util.XmrsDiGraph
Release date: 2015-06-26
There was no CHANGELOG file prior to this release, so I don't have much information about changes, except for commit messages.