Skip to content

Instantly share code, notes, and snippets.

@renaud
Created September 20, 2012 15:39
Show Gist options
  • Save renaud/3756669 to your computer and use it in GitHub Desktop.
Save renaud/3756669 to your computer and use it in GitHub Desktop.
Getting started with SecondString (https://github.com/TeamCohen/secondstring) Acronym detection
import java.io.IOException;
import java.util.Collection;
import java.util.Map;
import com.wcohen.ss.abbvGapsHmm.Acronym;
import com.wcohen.ss.abbvGapsHmm.AlignmentPredictionModel;
public class AbreviationsTest {
public static void main(String[] args) throws IOException {
// String txt = "RMI 61 140 , RMI 61 144 and RMI 61 280 are newly synthetized N- [ 8-R-dibenzo(b , f)oxepin-10-yl ] -N ' -methyl-piperazine-maleates which show interesting psychopharmacologic effects This work contains the results of a study performed with these three compounds , in order to demonstrate their neuropsycholeptic activity in comparison with chloropromazine (CPZ) and chlordiazepoxide (CPD) The inhibition of motility observed in mice shows that the compounds reduce the normal spontaneous motility as well as the muscle tone The central-depressant activity is evidenced by increased barbiturate-induced sleep and a remarkable eyelid ptosis can also be observed Our compounds do not show any activity on electroshock just as do CPZ and CPD As to the antipsychotic outline , our compounds show strong reduction of lethality due to amphetamine in grouped mice and a strong antiapomorphine activity They show also an antiaggressive effect and an inhibitory activity on avoidance behaviour much stronger than CPZ We have also found extrapyramidal effects , as catalepsy , common to many tranquillizers of the kind of the standards used by us As for vegetative phenomena , the compounds show hypotensive dose related action ranging from moderate to strong , probably due to an a-receptor inhibition Adrenolytic activity against lethal doses of adrenaline , antiserotonin and antihistaminic effects , as well as other actions (hypothermia , analgesia , etc . ) confirm that RMI 61 140 , RMI 61 144 and RMI 61 280 are endowed with pharmacologic properties similar and more potent than those of CPZ Studies on the metabolism of brain catecholamines show that they are similar to CPZ , although with less effect on dopamine level ";
String txt = "AIM:The balance of excitation and inhibition of neurons and neuronal network is very important to perform complete neuronal function. Damage or loss of inhibitory γ-aminobutyric acid (GABA)-ergic interneuron is associated with impaired inhibitory control of cortical pyramidal neurons, leading to hyperexcitability and epileptogenesis. Ectopic neurons in the basal ganglia are to be one of the pathological features of epileptogenesis. In the present study, we investigated distribution of interneuron subtypes between neocortex and caudate nucleus. METHODS:We performed immunohistochemistry of GABA, glutamic acid decarboxylase (GAD), calretinin (CR), calbindin (CB), parvalbumin (PV) and neuropeptide. We used surgical materials of four focal cortical dysplasia (FCD) cases, having lesions of neocortex and caudate nucleus, and eight age-matched autopsy controls. RESULTS:The pathology showed three FCD IIa, containing dysmorphic neurons, and one FCD IIb, balloon cells. In the neocortex, the concentrations (each positive cell number/all cell numbers in the evaluated field) of GAD+, CR+ and CB+ cells were significantly lower in FCD than in controls. On the contrary, in the caudate nucleus those of CR+ and CB+ cells were significantly more in FCD than in controls. CONCLUSION:The interneuron imbalance between the neocortex and basal ganglia may affect the epileptogenesis of FCD.";
AlignmentPredictionModel _alignPredictor = new AlignmentPredictionModel();
_alignPredictor.trainIfNeeded();
Collection<Acronym> all_predictions = _alignPredictor.predict(txt);
Map<String, Acronym> final_predictions = _alignPredictor
.acronymsArrayToMap(all_predictions);
System.out.println(final_predictions);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment