Cross Reference: sentence.rb
xref
: /
ontohub
/
app
/
models
/
sentence.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
sentence.rb revision 589fb95c2e105a0d11878550fd52a61f07ea81b9
class
Sentence
<
ActiveRecord
::
Base
include
Metadatable
belongs_to
:
ontology
has_and_belongs_to_many
:
entities
def
extract_class_names
c1
,
c2
=
self.text.split
(
'SubClassOf:'
)
.
map
do
|c|
c.scan
(
URI
::
regexp
(
Settings.allowed
_iri_schemes
)
)
end
[
c1
[
0
][-
1
],
c2
[
0
][-
1
] ]
end
end