<p>FastText it's based in the <a href="https://arxiv.org/abs/1607.01759" rel="nofollow noreferrer">WordNGrams</a>, it means that you need to be <strong><em>a complete sentence</em></strong> as input for the algorithm.</p>

<p>In your example, you're passing only a unigram for the algorithm, and depending on the number of <code>WordNGrams</code> that you're using in the parameters you model is not able to learn. </p>

<p><a href="https://www.urbandictionary.com/define.php?term=ELI5" rel="nofollow noreferrer">ELI5</a>: The algorithm it's saying: I'm able to learn complex sentences because the structure of the words and their combination, but you're sending to me only words. I cannot handle that.</p>
fasttext keeps predicting one label
<p>am trying to use fasttext to label some data <code>[url]</code>or<code>[PN]</code> just to test it
after training on <strong>6k</strong> of each label and upon predicting it keeps predicting [PN]</p>

<p>training command</p>

<pre><code>fasttext supervised -input input.txt -output model -minn 0 -maxn 0 -epoch 100 -lr 0.1
</code></pre>

<p>sample training data </p>

<pre><code>__label__PN 5962-8904XA
__label__PN 585DD4P54ZP
__label__PN GQ0B11400FCT
__label__URL http://ws.com/qd/lat/ispls32883.pdf
__label__URL http://ws.com/pdfs//2004/0423/ds/m412b.pdf
__label__URL http://ws.com/pdfs//2004/0423/mc68.pdf
</code></pre>

<p>sample test data</p>

<pre><code>945
74ACT399MTC
http://www.msn.com/mylink.pdf
MQ8797BH
74AC1153
ICL762PA+
54LS3482A
54LS76A/B
54HC27/A
www.google.com
</code></pre>