Re: [LogiLogi-list] Public beta updated!
Status: Beta
Brought to you by:
wybow
|
From: Wybo W. <wy...@lo...> - 2008-05-22 23:02:45
|
First of all; good work on the UI-side of the link-removal. I played
around a bit with it, and it seems to be working good now! :)
(& it seems very intuitive!)
> > commented that out in the menu... About the unit-test; doing the
> > calculations on the position-ranges should be covered by the
> > position-ranges lib under libs... So let me know if the old
> > implementation worked or not...
>
> We looked at the PositionRange class and used some methods for
> remove_links_from_position_ranges and made the unit test work.
>
> It is not possible to use the substract method of PositionRange. If
> you substract a link which begin and end position is smaller than
> another link from that link, you have to get two new position
> ranges. (e.g. 1..8 - 2...5 must be 1..2 and 5..8)
This is strange, as I've added quite a lot of tests to the
PositionRange lib on this, and I've added your case now to line 135 of
the lib/position_range/tests/position_range_list_test.rb, and it exactly
does what you say above here...:
assert_equal PositionRange::List.from_s('1,2:5,8'),
PositionRange::List.from_s('1,8') - PositionRange::List.from_s('2,5')
Also I have commented out your code in logi.rb and added a test to the
unit-test logi_test.rb where the middle-part of a link is removed, and
it works.
At first it was not saved, but line 325 seems to be enough to take
care of that.
If you find problems in the current solution, please let me know,
otherwise you can remove the commented out code.
greetings,
Wybo
---
::Student:
- Informatiekunde (computer linguistics, IR, webtech), History and Philosophy
- Member of the Center for Metahistory Groningen (http://www.rug.nl/let/cmg)
::Free Software and Open Source Developer:
- Active in the LogiLogi Foundation (http://foundation.logilogi.org)
- http://www.LogiLogi.org, Cumulative, shared commenting, publication and
idea sharing: Where insight comes together...
- http://www.OgOg.org, RSS feed articles rating, a meritocracy...
- ComLinToo, a computational linguistics toolset written in Perl
::Being:
- In the world, wavy hair, go figure (http://nl.logilogi.org/HomE/WyboWiersma)
|