# Import text with SemanticImport?

**URL:** <https://community.wolfram.com/t/import-text-with-semanticimport/12100>\
**Category:** Questions\
**Tags:** data-science, mathematica, import-and-export, machine-learning\
**Created:** [March 12, 2018, 3:59am UTC](https://community.wolfram.com/t/import-text-with-semanticimport/12100 "2018-03-12T03:59:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucianopinheiro](https://avatars.discourse-cdn.com/v4/letter/l/51bf81/32.png) [@lucianopinheiro](https://community.wolfram.com/u/lucianopinheiro)\
**Post date:** [March 12, 2018, 3:59am UTC](https://community.wolfram.com/t/import-text-with-semanticimport/12100/1 "2018-03-12T03:59:27Z")

</div>

Hello All.  
I have been trying to run the command SemanticImport, but it won’t work. I always get an error and no output. When I try to do the simple import of the same data it works. I have no idea what else to do. Has anyone experienced the same situation or has a solution for that? Thank you

```
In[16]:= data1 = Import["ExampleData/50states.txt", "Data"];
First[data1]

Out[17]= "Alabama"
In[18]:= data2 = SemanticImport["ExampleData/50states.txt"];
First[data2]

During evaluation of In[18]:= SemanticImport::unexpinvaliderr: Unexpected invalid input was detected. Processing will not continue

During evaluation of In[18]:= First::normal: Nonatomic expression expected at position 1 in First[$Failed].

Out[19]= First[$Failed]
In[20]:= $Version

Out[20]= "11.2.0 for Microsoft Windows (64-bit) (September 11, 2017)"

```

---

<div class="post-metadata">

**Author:** ![mikayele](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mikayele/32/18393_2.png) [@mikayele](https://community.wolfram.com/u/mikayele)\
**Post date:** [March 12, 2018, 8:41am UTC](https://community.wolfram.com/t/import-text-with-semanticimport/12100/2 "2018-03-12T08:41:03Z")

</div>

Hi,

Please download the latest ([11.3](http://blog.wolfram.com/2018/03/08/roaring-into-2018-with-another-big-release-launching-version-11-3-of-the-wolfram-language-mathematica/)) version of Mathematica.

```auto
$VersionNumber

```

```auto
(* ==> 11.3` *)

```

```auto
data2 = SemanticImport["ExampleData/50states.txt"]; 
First[%]

```

```auto
(* ==> "Alabama, United States"Entity["AdministrativeDivision", {"Alabama", "UnitedStates"}]"Entity[\"AdministrativeDivision\", {\"Alabama\", \"UnitedStates\"}]""administrative division" *)

```

Best,  
Mikayel  
[1]: [Roaring into 2018 with Another Big Release: Launching Version 11.3 of the Wolfram Language & Mathematica—Stephen Wolfram Writings](http://blog.wolfram.com/2018/03/08/roaring-into-2018-with-another-big-release-launching-version-11-3-of-the-wolfram-language-mathematica/)

---

<div class="post-metadata">

**Author:** ![lucianopinheiro](https://avatars.discourse-cdn.com/v4/letter/l/51bf81/32.png) [@lucianopinheiro](https://community.wolfram.com/u/lucianopinheiro)\
**Post date:** [March 12, 2018, 6:59pm UTC](https://community.wolfram.com/t/import-text-with-semanticimport/12100/3 "2018-03-12T18:59:27Z")

</div>

Thank you, Mikayel.  
I did updated to the latest version 11.3 and still shows the same error

---

<div class="post-metadata">

**Author:** ![lucianopinheiro](https://avatars.discourse-cdn.com/v4/letter/l/51bf81/32.png) [@lucianopinheiro](https://community.wolfram.com/u/lucianopinheiro)\
**Post date:** [March 12, 2018, 9:47pm UTC](https://community.wolfram.com/t/import-text-with-semanticimport/12100/4 "2018-03-12T21:47:23Z")

</div>

Even after getting Mathematica 11.3, SemanticImport command won’t work. Even if I copy straight from the Wolfram page, I keep getting the same error.

```
In[3]:= data2 = SemanticImport["ExampleData/50states.txt"];
First[data2]

During evaluation of In[3]:= SemanticImport::unexpinvaliderr: Unexpected invalid input was detected. Processing will not continue

During evaluation of In[3]:= First::normal: Nonatomic expression expected at position 1 in First[$Failed].

Out[4]= First[$Failed]

```

---

<div class="post-metadata">

**Author:** ![lucianopinheiro](https://avatars.discourse-cdn.com/v4/letter/l/51bf81/32.png) [@lucianopinheiro](https://community.wolfram.com/u/lucianopinheiro)\
**Post date:** [March 12, 2018, 10:36pm UTC](https://community.wolfram.com/t/import-text-with-semanticimport/12100/5 "2018-03-12T22:36:49Z")

</div>

I think I might have an old version of the Paclet,

```
In[9]:= "Version" /. PacletInformation["SemanticImport"]

Out[9]= "0.0.458"

```

But, when try the command

```
PacletUpdate["SemanticImport"]

```

Nothing shows…

---

<div class="post-metadata">

**Author:** ![mikayele](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mikayele/32/18393_2.png) [@mikayele](https://community.wolfram.com/u/mikayele)\
**Post date:** [March 22, 2018, 11:02am UTC](https://community.wolfram.com/t/import-text-with-semanticimport/12100/6 "2018-03-22T11:02:56Z")

</div>

> I think I might have an old version of the Paclet,

Your version seems fine, I have the same:

```auto
"Version" /. PacletInformation["SemanticImport"]

```

```auto
(* ==> "0.0.458" *)

```

Try removing `"SemanticImport"` from your machine and the re-run `SemanticImport["ExampleData/50states.txt"]`. If you are on Windows, it should be here: `C:\Users\*username*\AppData\Roaming\Mathematica\Paclets\Temporary`. Beware, `AppData` is a hidden folder.

---

<div class="post-metadata">

**Author:** ![scheren](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/scheren/32/28080_2.png) [@scheren](https://community.wolfram.com/u/scheren)\
**Post date:** [March 23, 2018, 2:27pm UTC](https://community.wolfram.com/t/import-text-with-semanticimport/12100/7 "2018-03-23T14:27:11Z")

</div>

Try backing up and removing $UserBaseDirectory.
