Cross Reference: readability.rb
xref
: /
ontohub
/
app
/
models
/
sentence
/
readability.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
readability.rb revision 43998a7504eb0ead17751c3232763b56bbc1c7f5
module
Sentence
::
Readability
extend
ActiveSupport
::
Concern
def
set_display_text
!
new_text
=
self.text.dup
self.entities.each
do
|
entity
|
unless
entity.display_name.nil
?
new_text.gsub
!
(
entity.iri
,
entity.display
_name
)
end
end
if
new_text
!=
self.text
self.display
_text
=
new_text
save
!
end
end
end