Open raniray opened 2 years ago
Are you using the command line interface outlined in the README or are you calling the function directly? If so, what does your code look like?
I am calling the function from the command line like this:
./run.sh src/parsing/message_segmenter.py predict ./out/segmentation-model.epoch-03.loss-0.199.h5 fasttext-model.bin ./annotations/test.jsonl --output-json out.json
Please make sure you have the correct Tensorflow/Keras version. It definitely has to be older than 2.2 if I remember correctly. If the version doesn't exist anymore for Python 3.10, you will have to use an older Python version.
Hello, I have been trying to test the code to segment my own email french data, so I needed to call the predict function. I am having some trouble to get the right input format. So I am getting the following error message:
` File "/home/rania/cyg-ds-notebooks/.pyvenv/.email_seg/lib/python3.10/site-packages/keras/engine/training.py", line 2041, in predict_function *
` The test file looks like this:
{"id": 143359, "text": "Nice news. Two comments:\n\n- How difficult it is to add \"Precise\" as target for the build? Precise is\nthe current LTS, so I think it could be usefull to provide recent viking's\npackage for this release.\n\n- As I'm curious, I'm curious to read how you do that ;-)\n\n2013/3/3 Robert Norris <rw_norris-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org>\n\n>\n>\n> >\n> > For Ubuntu users (on the latest release [Raring]) simply issue these\n> commands in a terminal:\n> >\n>\n> Ooops: I mean ^^^^ Quantal release ^^^^^ here.\n>\n>\n> ------------------------------------------------------------------------------\n> Everyone hates slow websites. So do we.\n> Make your web apps faster with AppDynamics\n> Download AppDynamics Lite for free today:\n> http://p.sf.net/sfu/appdyn_d2d_feb\n> _______________________________________________\n> Viking-devel mailing list\n> Viking-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org\n> https://lists.sourceforge.net/lists/listinfo/viking-devel\n> Viking home page: http://viking.sf.net/\n>\n\n\n\n-- \nGuilhem BONNEFILLE\n-=- JID: guyou-z1Ll2v8wZ5tg9hUCZPvPmw@public.gmane.org MSN: guilhem_bonnefille-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org\n-=- mailto:guilhem.bonnefille-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org\n-=- http://nathguil.free.fr/\n\n------------------------------------------------------------------------------\nEveryone hates slow websites. So do we.\nMake your web apps faster with AppDynamics\nDownload AppDynamics Lite for free today:\nhttp://p.sf.net/sfu/appdyn_d2d_feb", "meta": {"id": "19421", "message_id": "<urn:uuid:a454946c-1a83-49a7-9757-bdf5d61bc2f5>", "news_url": "news:CA+BUw6itPgzRJGfJCntvouJUAdLDZPhzGJLr3Fn24B4M8i-hWA@mail.gmail.com", "message_date": "2013-03-04 13:03:50", "filename": "/home/roce3528/cephfs/gmane/archives/news.gmane.org/gmane.comp.gis.viking.devel/000000.warc.gz", "warc_offset": "2734354", "newsgroup": "19421", "name": "gmane.comp.gis.viking.devel"}}