On 2007-05-24, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> On 2007-05-23, Steven Bethard <[EMAIL PROTECTED]> wrote:
> You mean... I left out the hard part? Shucks. I had really
> hoped it didn't matter.
>
>> * the recursive (or stack) part assigns children to parents
>> * the non-recursive part assi
On 2007-05-23, Steven Bethard <[EMAIL PROTECTED]> wrote:
> Neil Cerutti wrote:
>> On 2007-05-22, Steven Bethard <[EMAIL PROTECTED]> wrote:
>>> Thanks a lot! This put me on the right track (though the
>>> devil's definitely in the details). It's working now::
>>>
>>>
>> tree = xmltools.text_and_
Neil Cerutti wrote:
> On 2007-05-22, Steven Bethard <[EMAIL PROTECTED]> wrote:
>> Thanks a lot! This put me on the right track (though the
>> devil's definitely in the details). It's working now::
>>
>>
> tree = xmltools.text_and_spans_to_etree('aaa aaa aaaccc cccaaa', [
>> ... (etree.Eleme
On 2007-05-22, Steven Bethard <[EMAIL PROTECTED]> wrote:
> Thanks a lot! This put me on the right track (though the
> devil's definitely in the details). It's working now::
>
>
> >>> tree = xmltools.text_and_spans_to_etree('aaa aaa aaaccc cccaaa', [
> ... (etree.Element('a'), 0, 21),
> ...
Gabriel Genellina wrote:
> the idea would be as follows:
>
> - For each span generate two tuples: (start_offset, 1, end_offset,
> element) and (end_offset, 0, -start_offset, element). If start==end use
> (start_offset, -1, start_offset, element).
> - Collect all tuples in a list, and sort them.
On May 21, 11:02 pm, Steven Bethard <[EMAIL PROTECTED]> wrote:
> I have some text and a list of Element objects and their offsets, e.g.::
>
> >>> text = 'aaa aaa aaabbb bbbaaa'
> >>> spans = [
> ... (etree.Element('a'), 0, 21),
> ... (etree.Element('b'), 11, 18),
>
[EMAIL PROTECTED] wrote:
> On May 21, 11:02 pm, Steven Bethard <[EMAIL PROTECTED]> wrote:
>> I have some text and a list of Element objects and their offsets, e.g.::
>>
>> >>> text = 'aaa aaa aaabbb bbbaaa'
>> >>> spans = [
>> ... (etree.Element('a'), 0, 21),
>> ... (etr
On May 21, 11:02 pm, Steven Bethard <[EMAIL PROTECTED]> wrote:
> I have some text and a list of Element objects and their offsets, e.g.::
>
> >>> text = 'aaa aaa aaabbb bbbaaa'
> >>> spans = [
> ... (etree.Element('a'), 0, 21),
> ... (etree.Element('b'), 11, 18),
>
En Tue, 22 May 2007 03:02:34 -0300, Steven Bethard
<[EMAIL PROTECTED]> escribió:
> I have some text and a list of Element objects and their offsets, e.g.::
>
> >>> text = 'aaa aaa aaabbb bbbaaa'
> >>> spans = [
> ... (etree.Element('a'), 0, 21),
> ... (etree.Element('
I have some text and a list of Element objects and their offsets, e.g.::
>>> text = 'aaa aaa aaabbb bbbaaa'
>>> spans = [
... (etree.Element('a'), 0, 21),
... (etree.Element('b'), 11, 18),
... (etree.Element('c'), 18, 18),
... ]
I'd like to produce the co
10 matches
Mail list logo