Cross Reference: sentence.rb
xref
: /
ontohub
/
app
/
models
/
sentence.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
sentence.rb revision ee535131d1affd87e4c1733317557eabab69d9f5
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
(
ALLOWED_URI_SCHEMAS
)
)
end
[
c1
[
0
][-
1
],
c2
[
0
][-
1
] ]
end
end