timgremore
commited on
Commit
•
8b9fa1b
1
Parent(s):
f76a27b
fix: Classification server test and chunks fixture
Browse files
lib/medical_transcription/classification_supervisor.ex
CHANGED
@@ -1,4 +1,8 @@
|
|
1 |
defmodule Medicode.ClassificationSupervisor do
|
|
|
|
|
|
|
|
|
2 |
# Automatically defines child_spec/1
|
3 |
use DynamicSupervisor
|
4 |
|
|
|
1 |
defmodule Medicode.ClassificationSupervisor do
|
2 |
+
@moduledoc """
|
3 |
+
Supervisor responsible for classifying transcription text
|
4 |
+
"""
|
5 |
+
|
6 |
# Automatically defines child_spec/1
|
7 |
use DynamicSupervisor
|
8 |
|
test/medical_transcription/classification_server_test.exs
CHANGED
@@ -27,7 +27,7 @@ defmodule Medicode.ClassificationServerTest do
|
|
27 |
end
|
28 |
|
29 |
test "extract keywords and assign medical codes", %{chunk: chunk, transcription: transcription} do
|
30 |
-
spec = {ClassificationServer, {:chunk, chunk}}
|
31 |
|
32 |
{:ok, pid} = start_supervised(spec, restart: :transient)
|
33 |
|
|
|
27 |
end
|
28 |
|
29 |
test "extract keywords and assign medical codes", %{chunk: chunk, transcription: transcription} do
|
30 |
+
spec = {ClassificationServer, %{chunk: chunk, name: "transcription_chunk:#{chunk.id}"}}
|
31 |
|
32 |
{:ok, pid} = start_supervised(spec, restart: :transient)
|
33 |
|
test/support/fixtures/transcription_chunks_fixtures.ex
CHANGED
@@ -22,6 +22,7 @@ defmodule Medicode.TranscriptionChunksFixtures do
|
|
22 |
|> Enum.into(%{
|
23 |
transcription_id: transcription_id,
|
24 |
text: "My transcription text",
|
|
|
25 |
start_mark: "00:00:00",
|
26 |
end_mark: "00:00:07"
|
27 |
})
|
|
|
22 |
|> Enum.into(%{
|
23 |
transcription_id: transcription_id,
|
24 |
text: "My transcription text",
|
25 |
+
text_vector: Enum.to_list(0..383),
|
26 |
start_mark: "00:00:00",
|
27 |
end_mark: "00:00:07"
|
28 |
})
|