ayl / vaextractor Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
These tests will show the error:
def test_logmar_16
a = VAExtractor.new
val, _ = a.logmar([20, 16, '', '', '', '', ''])
assert(val != nil)
end
def test_logmar_19minus
a = VAExtractor.new
val, _ = a.logmar(["20", "19", "-", nil, nil, nil, nil, nil, nil, nil])
assert(val != nil)
end
This will cause the manual
variable to be nil:
vaextractor/lib/vaextractor.rb
Line 64 in d7c7261
And will cause an error here since lva[0]
cannot be compared to bcva['O?'][1]
.
vaextractor/lib/vaextractor.rb
Line 254 in d7c7261
I bypassed the error by supplying next if lva[0].nil?
, but this just ignores those values.
This can be replicated with the following test:
def test_scalp_does_not_error
a = VAExtractor.new
a.extract('SCALP ') # the 'LP ' will be captured
end
The regular expression incorrectly identifies some text as a potential VA score. If no VA score is found, these will raise an ErrorLateralityNotFound
. (E.g., "LP " is captured.)
vaextractor/lib/vaextractor.rb
Line 211 in d7c7261
NB: Under the current code, other errors may occur before since boundary conditions aren't checked, but this is the underlying issue. (E.g.,
vaextractor/lib/vaextractor.rb
Line 179 in d7c7261
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.